/* =========================================================
   01. EN-TÊTES DES ARTICLES ET PAGES DE RUBRIQUE
   ========================================================= */
.article-heading {
    padding-top: 30px;
    padding-bottom: 38px;
}

.breadcrumb {
    margin-bottom: 25px;
    color: #61788d;
    font-size: 12px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.article-heading .eyebrow {
    margin-bottom: 18px;
}

.article-heading h1 {
    max-width: 1000px;
    margin-bottom: 20px;
    font-size: clamp(34px, 3.6vw, 55px);
}

.article-heading>p {
    max-width: 900px;
    font-size: 17px;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 45px;
    padding-bottom: 40px;
}

.legacy {
    padding: 38px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 0;
    overflow-wrap: anywhere;
}

.legacy h2 {
    font-size: 30px;
    margin: 30px 0 20px;
}

.legacy h3 {
    font-size: 25px;
    margin: 24px 0 16px;
}

.legacy h5 {
    font: 600 16px/1.6 Arial, sans-serif;
    margin: 16px 0;
}

.legacy p {
    line-height: 1.8;
}

.legacy a:not(.button) {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #bdd2e2;
}

.legacy a:hover {
    color: var(--coral-dark);
}

.legacy dl {
    margin: 0;
}

.legacy dt {
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: bold;
    color: var(--navy);
}

.legacy dd {
    margin: 15px 0 28px;
    color: var(--text);
}

.legacy table {
    border-collapse: collapse;
    width: 100%;
}

.legacy td {
    padding: 10px;
    vertical-align: top;
}

.legacy td:empty {
    display: none;
}

.legacy .grid_8,
.legacy .grid_12 {
    width: auto;
}

.legacy details {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin: 12px 0;
    background: #fbfdff;
}

.legacy summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
}

.editor-note {
    margin: 35px 0 0;
    padding: 17px 20px;
    border-top: 1px solid #d8e6f0;
    border-radius: 10px;
    background: var(--blue-light);
    font-size: 12px;
    line-height: 1.7;
}

.article-aside {
    position: sticky;
    top: 120px;
    padding: 25px;
    border: 1px solid #dceaf5;
    border-radius: 12px;
    background: var(--blue-light);
}

.article-aside .eyebrow {
    font-size: 10px;
    margin-bottom: 12px;
}

.article-aside a {
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid #d7e7f3;
    font-size: 13px;
}

.article-aside a:last-child {
    border: 0;
}

.article-aside .aside-all {
    color: var(--coral-dark);
    font-weight: 600;
}

/* =========================================================
   02. CATALOGUE, RECHERCHE ET FAVORIS
   ========================================================= */
.explore-head {
    padding-top: 55px;
    padding-bottom: 25px;
}

.explore-head h1 {
    margin: 18px 0 22px;
}

.explore-head>p {
    max-width: 800px;
}

.searchbox {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 25px 0;
}

.searchbox input {
    flex: 1;
    min-height: 53px;
    background: #f8fbfe;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filters button {
    border: 1px solid #c8dce9;
    border-radius: 30px;
    background: white;
    padding: 10px 16px;
    font-size: 12px;
}

.filters button.active {
    color: white;
    background: var(--navy);
    border-color: var(--navy);
}

.count {
    margin: 24px 0 0;
    font-size: 12px;
    color: #62788a;
}

.results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 10px 0 35px;
}

.result-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.result-card .eyebrow {
    font-size: 10px;
    margin-bottom: 15px;
}

.result-card h2 {
    font-size: 24px;
    line-height: 1.15;
    margin-bottom: 15px;
}

.result-card p {
    flex: 1;
    font-size: 13px;
}

.result-card:hover {
    border-color: #edb2ae;
    box-shadow: var(--shadow);
}

.result-thumb {
    width: calc(100% + 50px);
    max-width: none;
    margin: -25px -25px 22px;
    height: 210px;
    object-fit: cover;
    object-position: center;
    background: #eef7fe;
}

.empty {
    grid-column: 1/-1;
    padding: 45px;
    background: var(--blue-light);
    text-align: center;
    border-radius: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 10px 0 40px;
}

.pagination button {
    padding: 10px 18px;
    border: 1px solid #c4d9e9;
    border-radius: 25px;
    background: white;
    font-size: 13px;
}

.pagination span {
    font-size: 12px;
}

.favorite-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    font-size: 12px;
}

.favorite-actions button {
    border: 0;
    background: none;
    text-decoration: underline;
    color: var(--coral-dark);
}

/* =========================================================
   03. CRÉATION DE CARTES ET PETITS MOTS
   ========================================================= */
.sharing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 55px;
    padding: 15px 0 45px;
}

.sharing label {
    display: block;
    margin: 20px 0 8px;
    font-size: 14px;
}

.sharing input,
.sharing select,
.sharing textarea {
    width: 100%;
}

.sharing textarea {
    min-height: 145px;
    resize: vertical;
}

.postcard {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 45px 35px;
    border: 12px solid #f9fcff;
    border-radius: 18px;
    min-height: 430px;
    background: var(--blue);
    text-align: center;
    overflow-wrap: anywhere;
}

.postcard .heart {
    color: var(--coral);
    font-size: 60px;
}

.postcard blockquote {
    margin: 20px 0;
    font: 700 33px/1.35 Georgia, serif;
    white-space: pre-wrap;
}

.postcard p {
    font-size: 15px;
}

.postcard small {
    font-size: 10px;
    letter-spacing: 1.8px;
}

/* =========================================================
   04. OUTILS, PLAN DU SITE ET DOCUMENTATION
   ========================================================= */
.tool-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 35px;
    border-radius: 15px;
    background: var(--blue-light);
    border: 1px solid #dceaf4;
}

.tool-panel form {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 12px;
}

.tool-panel input {
    width: 100%;
}

.tool-panel label {
    font-size: 14px;
}

.tool-panel .button {
    margin-top: 10px;
}

.tool-panel output {
    display: block;
    font-size: 24px;
    font-family: Georgia, serif;
    font-weight: bold;
    margin-top: 15px;
}

.tool-panel h2 {
    font-size: 30px;
}

.tool-panel p {
    font-size: 14px;
}

.sitemap-section {
    margin-bottom: 45px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.sitemap-section h2 {
    font-size: 30px;
}

.sitemap-section ul {
    columns: 3;
    column-gap: 40px;
    padding-left: 20px;
}

.sitemap-section li {
    break-inside: avoid;
    margin-bottom: 12px;
    font-size: 13px;
}

.sitemap-section a:hover {
    color: var(--coral-dark);
    text-decoration: underline;
}

.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
}

.guide-grid section {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.guide-grid h2 {
    font-size: 25px;
}

.guide-grid pre {
    white-space: pre-wrap;
    font-size: 12px;
    background: #f3f8fc;
    padding: 15px;
}

/* =========================================================
   05. ADAPTATION MOBILE
   ========================================================= */
/* Blocs éditoriaux communs : photo à gauche, texte à droite. */
.content-feature {
    display: grid;
    grid-template-columns: minmax(90px, 30%) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    height: 100%;
    padding: 22px;
    border: 1px solid #dce8f1;
    border-radius: 14px;
    background: #f7fbfe;
}
.content-feature--small {
    grid-template-columns: 100px minmax(0, 1fr);
}
.content-feature-media {
    min-width: 0;
    padding: 10px;
    border-radius: 11px;
    background: white;
}
.content-feature-media a {
    display: block;
}
.feature-photo {
    display: block;
    width: 100%;
    height: auto;
    max-height: 270px;
    object-fit: contain;
    border-radius: 8px;
}
.content-feature-copy {
    min-width: 0;
    font-size: 14px;
    line-height: 1.8;
}
.restored-content .content-feature h2,
.restored-content .content-feature h3 {
    margin: 0 0 14px;
    font-size: clamp(20px, 1.8vw, 26px);
    line-height: 1.25;
    letter-spacing: -.3px;
}
.content-column--wide {
    grid-column: 1 / -1;
}
.restored-content .content-feature h4,
.restored-content .content-feature h5 {
    margin: 16px 0 10px;
    font: 600 16px/1.6 Arial, sans-serif;
}
.ingredient-text {
    padding: 12px 15px;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    line-height: 1.7;
}
.content-feature-copy p:last-child {
    margin-bottom: 0;
}
.chapter-intro {
    padding: 22px 26px;
    border-left: 3px solid #e5a6a1;
    border-radius: 0 12px 12px 0;
    background: linear-gradient(100deg, #f2f8fd, #fffaf7);
}
.restored-content .chapter-intro h2,
.restored-content .chapter-intro h3 {
    margin: 12px 0 0;
    max-width: 900px;
    font-size: clamp(24px, 2.4vw, 34px);
    line-height: 1.25;
}
.intro-kicker {
    margin: 0 0 4px;
    color: var(--coral-dark);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .8px;
}
@media (max-width: 650px) {
    .content-feature,
    .content-feature--small {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }
    .content-feature-media {
        width: min(100%, 230px);
    }
    .content-feature--small .content-feature-media {
        width: 110px;
    }
    .chapter-intro {
        padding: 18px;
    }
}

/* Rubrique grossesse : grandes photos et titres à côté des images. */
.pregnancy-intro {
    display: grid;
    gap: 22px;
    margin-bottom: 30px;
}

.pregnancy-intro h2 {
    margin: 12px 0 0;
    font-size: clamp(27px, 2.6vw, 38px);
    line-height: 1.2;
}

.pregnancy-intro figure {
    margin: 0;
    padding: 0;
}

.pregnancy-intro img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
}

.pregnancy-intro figcaption {
    padding-top: 10px;
    color: #667e90;
    font-size: 12px;
    text-align: center;
}

.pregnancy-guide-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0 26px;
    align-items: center;
    padding: 22px;
    border: 1px solid #dce9f3;
    border-radius: 14px;
    background: #f4f9fd;
}

.pregnancy-guide-card>a {
    grid-row: auto;
}

.pregnancy-guide-card .guide-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.pregnancy-guide-card h3 {
    margin: 0 0 12px;
    font-size: 27px;
}

.pregnancy-guide-card p {
    margin: 0;
    font-size: 14px;
}

.pregnancy-calendar {
    margin-top: 30px;
}

.calendar-card {
    display: grid;
    grid-template-columns: minmax(180px, 270px) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    padding: 22px;
    border: 1px solid #dce9f3;
    border-radius: 14px;
    background: #fffbf8;
}

.calendar-copy h3 {
    margin: 0 0 15px;
    font-size: 27px;
}

.calendar-copy p {
    margin: 0;
    font-size: 14px;
}

.pregnancy-calendar .calendar-photo {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    border-radius: 12px;
}

@media (max-width:650px) {
    .calendar-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }

    .pregnancy-calendar .calendar-photo {
        width: min(100%, 260px);
    }

    .pregnancy-guide-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px;
    }

    .pregnancy-guide-card>a {
        grid-row: auto;
    }

    .pregnancy-guide-card h3 {
        margin: 0;
    }
}

@media (max-width: 1100px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 25px;
    }

    .legacy {
        padding: 28px;
    }

    .article-aside {
        padding: 20px;
    }

    .results {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 750px) {
    .article-heading {
        padding-top: 25px;
    }

    .article-heading>p {
        font-size: 15px;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-aside {
        position: static;
    }

    .legacy {
        padding: 20px;
    }

    .legacy table:not(.media-gallery),
    .legacy table:not(.media-gallery)>tbody,
    .legacy table:not(.media-gallery)>tbody>tr,
    .legacy table:not(.media-gallery)>tbody>tr>td {
        display: block;
    }

    .legacy td {
        padding: 7px 0;
    }

    .legacy h2 {
        font-size: 26px;
    }

    .legacy h3 {
        font-size: 23px;
    }

    .sharing,
    .tool-panel,
    .guide-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .explore-head {
        padding-top: 35px;
    }

    .postcard {
        min-height: 350px;
    }

    .sitemap-section ul {
        columns: 2;
    }
}

@media (max-width: 500px) {
    .results {
        grid-template-columns: 1fr;
    }

    .sitemap-section ul {
        columns: 1;
    }

    .sitemap-section {
        padding: 20px;
    }

    .pagination {
        gap: 8px;
    }

    .pagination button {
        padding: 10px 13px;
    }
}

/* Aperçu facultatif de la photo ajoutée à une carte. */
#card-photo-preview {
    width: 100%;
    max-height: 190px;
    margin-bottom: 20px;
    border-radius: 10px;
    object-fit: contain;
    background: white;
}

/* Vignettes éditoriales et aperçus complets des galeries. */
.result-thumb--contain {
    object-fit: contain;
    padding: 16px;
    background: linear-gradient(135deg, #edf6fe, #fff7f4);
}

/* Chaque carte possède un lien de lecture et un bouton de partage séparé. */
.result-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
}

.result-link p {
    flex: 1;
}

.result-link>span:last-child {
    color: var(--coral-dark);
    font-size: 12px;
}

.result-actions {
    padding: 0 25px 22px;
    margin-top: 14px;
}

.card-share-button {
    padding: 9px 17px;
    border: 1px solid #efb7b4;
    border-radius: 25px;
    background: #fff2f1;
    color: var(--coral-dark);
    font-size: 12px;
}

.card-share-button:hover {
    background: #fbdedb;
}

.result-link .result-thumb {
    object-fit: contain;
    height: 230px;
    padding: 12px;
}

.result-art {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% + 50px);
    min-height: 230px;
    margin: -25px -25px 22px;
    padding: 24px 30px;
    text-align: center;
    background: radial-gradient(circle at 8% 12%, #ffffffcc 0 8%, transparent 9%), radial-gradient(circle at 90% 85%, #ffffffbb 0 13%, transparent 14%), #e1effa;
}

.result-art[data-palette="1"] {
    background-color: #fae7e5;
}

.result-art[data-palette="2"] {
    background-color: #f4eedd;
}

.result-art[data-palette="3"] {
    background-color: #e9eddf;
}

.result-art[data-palette="4"] {
    background-color: #eee9f5;
}

.cover-symbol {
    color: var(--coral-dark);
    font: 40px/1 Georgia, serif;
}

.cover-title {
    font: 700 26px/1.15 Georgia, serif;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.result-art small {
    margin-top: 5px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Contenus et listes de rubriques : conserver tous les blocs fournis. */
.restored-content {
    display: grid;
    gap: 28px;
}

.restored-content>div {
    margin: 0;
}

.restored-content .row:has(> .grid_4):not(:has(> .grid_8)):not(:has(> .grid_12)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 22px;
}

.restored-content .row>.grid_4 {
    min-width: 0;
}

.restored-content .grid_4 h2 {
    font-size: 22px;
}

.restored-content .grid_4 .content-image {
    max-height: 260px;
}

.restored-content .grid_4:has(dl) {
    padding: 20px;
    border: 1px solid #dce9f4;
    border-radius: 12px;
    background: #f7fbfe;
}

.restored-content .terms-list dt {
    font-size: 20px;
}

.restored-content .terms-list h2 {
    font-size: 19px;
    line-height: 1.4;
}

.restored-content .list {
    padding-left: 22px;
}

.restored-content .list li {
    margin-bottom: 12px;
}

.code-example {
    padding: 18px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-size: 12px;
    border-radius: 10px;
    background: #f0f6fb;
}

@media (max-width: 650px) {
    .restored-content .row:has(> .grid_4):not(:has(> .grid_8)):not(:has(> .grid_12)) {
        grid-template-columns: 1fr;
    }
}
