
/* ==================================================
   ÉDITIONS ABAJO RIO
   Feuille de style principale
   ================================================== */


/* ==================================================
   1. POLICES LOCALES
   ================================================== */

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/Cormorant_Garamond/CormorantGaramond-VariableFont_wght.woff2")
        format("woff2");
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "Cormorant Garamond";
    src: url("../fonts/Cormorant_Garamond/CormorantGaramond-Italic-VariableFont_wght.woff2")
        format("woff2");
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat/Montserrat-VariableFont_wght.woff2")
        format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat/Montserrat-Italic-VariableFont_wght.woff2")
        format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
}


/* ==================================================
   2. VARIABLES
   ================================================== */

:root {
    --color-background: #fcfcfc;
    --color-primary: #001a3b;
    --color-accent: #f79400;
    --color-text: #34383e;
    --color-muted: #62676d;
    --color-soft: #f3f1ed;
    --color-border: #dedede;
    --color-white: #ffffff;

    --font-title: "Cormorant Garamond", Georgia, serif;
    --font-text: "Montserrat", Arial, sans-serif;

    --container-width: 1200px;
    --transition: 300ms ease-in-out;
}


/* ==================================================
   3. BASE ET RÉINITIALISATION
   ================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-text);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.8;
}

body:has(dialog[open]) {
    overflow: hidden;
}

h1,
h2,
h3,
p,
figure {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-title);
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.2;
}

p + p {
    margin-top: 16px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}



[hidden] {
    display: none !important;
}

::selection {
    background: var(--color-accent);
    color: var(--color-primary);
}
/* Suppression du surlignage tactile sur mobile */

@media (pointer: coarse) {
    a,
    button,
    summary {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ==================================================
   4. ACCESSIBILITÉ
   ================================================== */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 5px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 12px 20px;
    background: var(--color-primary);
    color: var(--color-white);
}

.skip-link:focus {
    top: 16px;
}


/* ==================================================
   5. STRUCTURE GÉNÉRALE
   ================================================== */

.container {
    width: min(100% - 48px, var(--container-width));
    margin-inline: auto;
}

.section {
    padding: 72px 0;
}

.section-title {
    margin-bottom: 36px;
    font-size: clamp(2.2rem, 4vw, 3rem);
    text-align: center;
}

.section-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 2px;
    margin: 18px auto 0;
    background: var(--color-accent);
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 36px;
    text-align: center;
}


/* ==================================================
   6. EN-TÊTE ET LOGO
   ================================================== */

.site-header {
     background: var(--color-white);
}

.brand {
    padding: 12px 24px 24px;
    text-align: center;
}

.site-title {
    line-height: 1;
}

.site-title a {
    display: inline-block;
}

.site-logo {
    width: min(100%, 360px);
    height: auto;
    margin-inline: auto;
}

.site-subtitle {
    margin-top: 4px;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}


/* ==================================================
   7. NAVIGATION PRINCIPALE
   ================================================== */

.site-nav {
    position: relative;
    z-index: 100;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-background);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vw, 48px);
    margin: 0;
    padding: 0 24px;
    list-style: none;
}

.nav-links > li {
    position: relative;
}

.nav-links > li > a,
.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 56px;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.nav-links > li > a:hover,
.dropdown-toggle:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 6px;
}

.nav-links > li > a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 6px;
}


/* ==================================================
   8. MENUS DÉROULANTS
   ================================================== */

.dropdown-arrow {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg);
    transition: transform var(--transition);
}

.dropdown-toggle[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(225deg);
    margin-top: 3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 210px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-top: 2px solid var(--color-accent);
    box-shadow: 0 8px 20px rgb(0 26 59 / 7%);
}

.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 11px 20px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    background: var(--color-soft);
}


/* ==================================================
   9. MENU BURGER
   ================================================== */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: transform var(--transition),
                opacity var(--transition);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==================================================
   10. LIVRES
   ================================================== */

.books-section {
    background: var(--color-background);
}


/* LIVRES */

.book-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px minmax(0, 1fr);
    align-items: center;
    gap: 60px;
    max-width: 1000px;
    margin-inline: auto;
}

.book-cover {
    grid-column: 2;
}

.book-information {
    grid-column: 3;
    text-align: left;
}

.book-cover img {
    width: 100%;
    height: auto;
    box-shadow: 0 8px 24px rgb(0 26 59 / 12%);
}



.book-title {
    font-family: var(--font-text);
    font-size: clamp(1.3rem, 2vw, 1.5rem);
    font-weight: 500;
    font-style: normal;
    color: var(--color-text);
    margin-bottom: 24px;
}

.book-authors,
.book-description,
.book-details {
    font-family: var(--font-text);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.8;
}

.book-authors,
.book-description {
    margin-bottom: 20px;
}

.book-details {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.book-information p + p {
    margin-top: 2px;
}





/* ==================================================
   11. CARTES POSTALES
   ================================================== */

.postcards-section {
    background: var(--color-soft);
    border-top: 1px solid var(--color-border);
}

.postcards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.postcard {
    min-width: 0;
    text-align: center;
}

.postcard-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1.25;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.postcard-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (hover: hover) and (pointer: fine) {

    .postcard-preview:hover img {
        transform: scale(1.045);
    }

}

.postcard-figure figcaption {
    margin-top: 22px;
}

.postcard-figure h3 {
    font-size: 1.8rem;
}

.postcard-figure figcaption p {
    margin-top: 6px;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.gallery-help {
    margin-top: 36px;
    color: var(--color-muted);
    font-size: 0.78rem;
    text-align: center;
}




/* Points de vente */

.sales-locations {
    margin-top: 12px;
}

.sales-locations summary {
    color: var(--color-primary);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 5px;
    transition: color var(--transition);
}

.sales-locations summary:hover {
    color: var(--color-muted);
}

.sales-location {
    margin-top: 24px;
    padding: 20px;
    border-top: 1px solid var(--color-border);
}

.sales-location h3 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.sales-location p {
    margin-bottom: 12px;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.sales-location address {
    font-style: normal;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.sales-location a {
    display: inline-block;
    margin-top: 16px;
    font-size: 0.8rem;
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 4px;
}

.sales-location a:hover {
    color: var(--color-muted);
}
/* Animation du volet des points de vente */

.sales-locations {
    interpolate-size: allow-keywords;
}

.sales-locations::details-content {
    height: 0;
    opacity: 0;
    overflow: hidden;

    transition:
        height 450ms ease-in-out,
        opacity 350ms ease-in-out,
        content-visibility 450ms allow-discrete;
}

.sales-locations[open]::details-content {
    height: auto;
    opacity: 1;
}
/* ==================================================
   12. FENÊTRE RECTO / VERSO
   ================================================== */

.postcard-dialog {
    width: min(92vw, 800px);
    max-height: 92vh;
    padding: 0;
    border: 1px solid var(--color-border);
    background: var(--color-soft);
    color: var(--color-text);
    overflow: auto;
}

.postcard-dialog::backdrop {
    background: rgb(0 15 35 / 85%);
}

.dialog-content {
    position: relative;
    padding: 28px;
    text-align: center;
}

.dialog-close {
    position: absolute;
    top: 8px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 2rem;
    line-height: 1;
}

#dialog-title {
    padding-inline: 32px;
    margin-bottom: 20px;
    font-size: 2rem;
}

.dialog-figure img {
    width: auto;
    max-width: 100%;
    max-height: 60vh;
    margin-inline: auto;
    object-fit: contain;
}
.dialog-figure img.is-verso {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
}

#dialog-caption {
    margin-top: 10px;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.dialog-controls {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 0;
    background: var(--color-soft);
}

.dialog-controls button {
    min-width: 100px;
    min-height: 44px;
    padding: 8px 18px;
    border: 1px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-size: 0.8rem;
    transition: background var(--transition),
                color var(--transition);
}

.dialog-controls button:hover {
    background: var(--color-soft);
}

.dialog-controls button[aria-pressed="true"] {
    background: var(--color-primary);
    color: var(--color-white);
}


/* ==================================================
   13. LA MAISON D'ÉDITION
   ================================================== */

.house-section {
    background: var(--color-background);
}

.house-section article {
    max-width: 760px;
    margin-inline: auto;
    padding: 24px 0;
}

.house-section article + article {
    border-top: 1px solid var(--color-border);
}

.house-section h3 {
    margin-bottom: 12px;
    font-size: 1.8rem;
}

.house-section article p {
    color: var(--color-muted);
}
/* Titres des rubriques de la maison */

.house-section article h3.section-title {
    font-family: var(--font-title);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 600;
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 36px;
}
/* Présentation des éditions */

#les-editions h4 {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
    margin: 36px 0 16px;
}

#les-editions p {
    line-height: 1.9;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.mobile-break {
    display: none;
}
/* Collaborations */

.collaborators-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
    margin-top: 32px;
}

.collaborator-card {
    display: block;
    text-align: center;
    color: var(--color-text);
}

.collaborator-figure {
    margin: 0;
}

.collaborator-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: var(--color-soft);
}

.collaborator-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.collaborator-figure figcaption {
    margin-top: 18px;
}

.collaborator-name {
    font-family: var(--font-text);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    margin: 0 0 6px;
}

.collaborator-role {
    font-size: 0.8rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.collaborator-project {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 8px;
}

@media (hover: hover) and (pointer: fine) {

    .collaborator-card:hover .collaborator-image img {
        transform: scale(1.045);
    }

    .collaborator-card:hover .collaborator-name {
        text-decoration: underline;
        text-decoration-color: var(--color-accent);
        text-underline-offset: 5px;
    }

}
/* Actualités */

.news-list {
    margin-top: 24px;
}

.news-item {
    padding: 24px 0;
}

.news-item + .news-item {
    border-top: 1px solid var(--color-border);
}

.news-item:first-child {
    padding-top: 0;
}

.news-item:last-child {
    padding-bottom: 0;
}

.news-date {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.news-title {
    font-family: var(--font-title);
    font-size: clamp(1.4rem, 2.5vw, 1.7rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary);
    margin: 0 0 12px;
}

.news-description {
    font-size: 0.9rem;
    line-height: 1.8;
}

.news-location {
    font-size: 0.85rem;
    font-style: italic;
}
/* Presse */

#presse p {
    text-align: center;
}
/* ==================================================
   14. BOUTIQUE
   ================================================== */

.shop-section {
    background: var(--color-soft);
    text-align: center;
}
.shop-section p {
    max-width: 650px;
    margin-inline: auto;
}

.shop-status {
    margin-bottom: 16px;
    color: var(--color-primary);
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-style: italic;
}


/* ==================================================
   15. DÉPÔT DE MANUSCRITS
   ================================================== */

.manuscripts-section {
    background: var(--color-background);
    text-align: center;
}

.manuscripts-section p {
    max-width: 760px;
    margin-inline: auto;
}

.contact-email {
    margin-block: 22px;
}

.contact-email a {
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 5px;
    overflow-wrap: anywhere;
}

.contact-email a:hover {
    text-decoration-thickness: 2px;
}

.manuscripts-information {
    color: var(--color-muted);
    font-size: 0.85rem;
}


/* ==================================================
   16. PIED DE PAGE
   ================================================== */

.site-footer {
    padding: 36px 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-background);
    text-align: center;
}
/* Réseaux sociaux */

.social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-primary);
    transition: color var(--transition);
}

.social-links svg {
    display: block;
    width: 24px;
    height: 24px;
}

@media (hover: hover) and (pointer: fine) {

    .social-links a:hover {
        color: var(--color-accent);
    }

}
.copyright {
    color: var(--color-muted);
    font-size: 0.75rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 28px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    font-size: 0.75rem;
}

.footer-links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ==================================================
   PAGES JURIDIQUES
   ================================================== */

.legal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 56px;
    padding: 12px 24px;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.legal-nav a {
    font-size: 0.85rem;
    transition: color var(--transition);
}

.legal-nav a:hover {
    color: var(--color-muted);
}

.legal-section {
    background: var(--color-background);
}

.legal-container {
    max-width: 860px;
}

.legal-container .section-title {
    margin-bottom: 24px;
}

.legal-update {
    margin-bottom: 40px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.legal-article {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--color-border);
}

.legal-article h2 {
    margin-bottom: 18px;
    font-family: var(--font-text);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-primary);
    line-height: 1.6;
}

.legal-container p,
.legal-container li {
    font-size: 0.9rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.legal-container ul {
    margin: 16px 0;
    padding-left: 24px;
}

.legal-container li {
    margin-bottom: 6px;
}

.legal-container a {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-underline-offset: 4px;
    transition: color var(--transition);
}

.legal-container a:hover {
    color: var(--color-muted);
}

.legal-return {
    margin-top: 48px;
    text-align: center;
}

.legal-return a {
    font-size: 0.85rem;
}

/* ==================================================
   17. RESPONSIVE : TABLETTES ET MOBILES
   ================================================== */

@media (max-width: 768px) {

    .container {
        width: calc(100% - 36px);
    }

    .section {
        padding: 48px 0;
    }

    .section-title {
        margin-bottom: 28px;
    }

    .brand {
        padding: 8px 18px 20px;
    }

    .site-logo {
        width: min(100%, 280px);
    }

    .site-subtitle {
        font-size: 0.75rem;
    }

    /* Navigation mobile */

    .menu-toggle:not([hidden]) {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin: 5px 18px 5px auto;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 18px;
    }

    .menu-toggle:not([hidden])[aria-expanded="false"]
        + .nav-links {
        display: none;
    }

    .nav-links > li + li {
        border-top: 1px solid var(--color-border);
    }

    .nav-links > li > a,
    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
        min-height: 48px;
        padding: 12px 8px;
        text-align: left;
    }

    .dropdown-menu {
        position: static;
        min-width: 0;
        padding: 0 0 10px 16px;
        border: 0;
        border-left: 2px solid var(--color-accent);
        box-shadow: none;
    }

    .dropdown-menu a {
        padding: 10px 12px;
        white-space: normal;
    }


    /* Livre */

    .book-card {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 28px;
    }

    .book-cover {
        grid-column: 1;
        width: min(100%, 260px);
    }

    .book-information {
        grid-column: 1;
        text-align: center;
    }

    .book-title {
        margin-bottom: 20px;
    }
    /* Cartes postales */

    .postcards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 20px;
    }

    .postcard-figure h3 {
        font-size: 1.6rem;
    }

    .dialog-content {
        padding: 20px 14px;
    }
    .legal-article {
    margin-top: 28px;
    padding-top: 22px;
}

.legal-article h2 {
    font-size: 1rem;
}

.legal-update {
    margin-bottom: 28px;
}

.legal-container p,
.legal-container li {
    font-size: 0.85rem;
}
/* Collaborations */

.collaborators-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.house-section article h3.section-title {
    margin-bottom: 28px;
}
}


/* ==================================================
   18. PETITS ÉCRANS
   ================================================== */

@media (max-width: 480px) {

    body {
        font-size: 14px;
    }

    .postcards-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .postcard {
        width: min(100%, 320px);
        margin-inline: auto;
    }

    .postcard-preview {
        aspect-ratio: auto;
    }

    .postcard-preview img {
        width: 100%;
        height: auto;
    }

    .postcard-figure figcaption {
        margin-top: 16px;
    }

    .dialog-controls button {
        min-width: 85px;
    }

    .mobile-break {
    display: initial;
}
/* Collaborations */

.collaborators-grid {
    grid-template-columns: 1fr;
    max-width: 200px;
    gap: 32px;
    margin-inline: auto;
}
}


/* ==================================================
   19. PRÉFÉRENCES D'ACCESSIBILITÉ
   ================================================== */
@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after,
    *::details-content {
        animation: none !important;
        transition: none !important;
    }

}


/* ==================================================
   FIN DE LA FEUILLE DE STYLE
   ================================================== */
