/* =========================================================
   01. IDENTITÉ VISUELLE — MAGAZINE FAMILIAL
   ========================================================= */
:root {
    --navy: #073453;
    --coral: #ed6863;
    --coral-dark: #c34c49;
    --blue: #dfF0fc;
    --blue-light: #f3f9fe;
    --text: #425770;
    --border: #dfe7ed;
    --white: #ffffff;
    --radius: 14px;
    --shadow: 0 12px 35px rgb(7 52 83 / 8%);
}

/* =========================================================
   02. BASE, TYPOGRAPHIE ET ACCESSIBILITÉ
   ========================================================= */
* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--white);
    color: var(--navy);
    font: 16px/1.65 Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

button {
    color: inherit;
    cursor: pointer;
}

button:disabled {
    opacity: .55;
    cursor: default;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 5px;
}

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

[hidden] {
    display: none !important;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy);
    line-height: 1.12;
}

h1 {
    font-size: clamp(36px, 4vw, 60px);
    letter-spacing: -1.5px;
}

h2 {
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -.8px;
}

h3 {
    font-size: 24px;
}

p {
    margin-top: 0;
    color: var(--text);
}

.wrap {
    width: min(1434px, calc(100% - 100px));
    margin-inline: auto;
}

.eyebrow {
    display: block;
    color: var(--coral-dark);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.3px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px 26px;
    border: 1px solid var(--coral);
    border-radius: 50px;
    background: var(--coral);
    color: white;
    font-size: 16px;
    text-decoration: none;
    transition: background .2s, transform .2s;
}

.button:hover {
    background: var(--coral-dark);
    border-color: var(--coral-dark);
    transform: translateY(-1px);
}

.text-link {
    color: var(--navy);
    border-bottom: 1px solid #9db8cc;
    padding-bottom: 4px;
    font-size: 14px;
}

.skip {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 100;
    padding: 12px;
    background: white;
}

.skip:focus {
    top: 10px;
}

.topline {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 20px;
    text-align: center;
    gap: 5px;
    min-height: 38px;
    background: linear-gradient(100deg, #e5f2fc, #f7faff 55%, #fcecea);
    color: #284c66;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .65px;
    text-transform: none;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
}

.actions button {
    padding: 11px 17px;
    border: 1px solid #c9dce9;
    border-radius: 30px;
    background: white;
    font-size: 12px;
}

.actions button:hover,
.actions button.saved {
    background: #fce8e6;
    border-color: #f1bfbb;
}

input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
    padding: 13px 16px;
    border: 1px solid #bfd0df;
    border-radius: 8px;
    color: var(--navy);
    background: white;
}


/* Ajout de photos : même bouton dans tous les créateurs. */
input[type="file"] {
    padding: 8px;
    border: 1px solid #c5dce9;
    border-radius: 16px;
    background: #f5faff;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 13px 20px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(120deg, #ee8276, #d85e68);
    color: white;
    font: inherit;
    font-weight: 700;
    box-shadow: 0 4px 10px #d85e6826;
    cursor: pointer;
    transition: background .2s, box-shadow .2s;
}

input[type="file"]:hover::file-selector-button {
    background: linear-gradient(120deg, #df7065, #c84e5b);
    box-shadow: 0 5px 14px #d85e6838;
}

input[type="file"]:focus-visible {
    outline: 3px solid #87b7d5;
    outline-offset: 3px;
}

input:focus,
textarea:focus {
    border-color: var(--coral);
}

#toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 200;
    display: none;
    transform: translateX(-50%);
    max-width: calc(100% - 30px);
    padding: 13px 22px;
    border-radius: 12px;
    background: var(--navy);
    color: white;
    box-shadow: var(--shadow);
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   03. PIED DE PAGE COMMUN
   ========================================================= */
.site-footer {
    margin-top: 60px;
    padding: 50px 0 0;
    border-top: 1px solid #cce2f2;
    background: var(--blue-light);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 45px;
}

.site-footer .brand {
    font-size: 34px;
}

.site-footer .brand-heart {
    font-size: 15px;
}

.footer-top p {
    margin-top: 22px;
    font-size: 13px;
}

.footer-top h2 {
    font-size: 18px;
    margin-bottom: 18px;
}

.footer-top>div>a:not(.brand) {
    display: block;
    margin-bottom: 9px;
    font-size: 12px;
}

.footer-top>div>a:hover {
    color: var(--coral-dark);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid #cfe2ef;
    font-size: 11px;
}

/* =========================================================
   04. PETITS ÉCRANS ET IMPRESSION
   ========================================================= */
@media (max-width: 900px) {
    .wrap {
        width: calc(100% - 40px);
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .wrap {
        width: calc(100% - 30px);
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

@media print {

    .site-header,
    .site-footer,
    .topline,
    .actions,
    .article-aside,
    #toast {
        display: none !important;
    }

    .wrap {
        width: 100%;
    }

    body {
        background: white;
        color: black;
    }

    .article-layout {
        display: block !important;
    }

    .legacy {
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
}

/* Fenêtre de partage commune à toutes les pages et aux vignettes. */
.share-dialog {
    width: min(550px, calc(100% - 30px));
    max-height: 90vh;
    padding: 28px;
    margin: auto;
    border: 0;
    border-radius: 20px;
    background: white;
    color: var(--navy);
    box-shadow: 0 25px 80px #03294355;
}

.share-dialog::backdrop {
    background: #03294380;
}

.share-dialog h2 {
    padding-right: 25px;
    margin: 3px 0 20px;
    font-size: 32px;
}

.share-close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 35px;
    height: 35px;
    border: 0;
    background: #eef6fc;
    border-radius: 50%;
    font-size: 28px;
}

.share-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #dce9f2;
    background: #f8fcff;
    border-radius: 12px;
}

.share-preview img {
    width: 100px;
    height: 75px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
}

.share-preview p {
    margin: 0;
    max-height: 90px;
    overflow-y: auto;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.45;
}

.share-networks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.share-networks a {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 47px;
    padding: 8px 12px;
    border: 1px solid #e2edf5;
    border-radius: 10px;
    font-size: 14px;
}

.share-networks a:hover {
    background: #e7f3fc;
    border-color: #bbd7eb;
}

.share-networks a span {
    display: grid;
    place-items: center;
    width: 26px;
    font-size: 22px;
    font-weight: 600;
    color: var(--coral-dark);
}

.share-utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.share-utilities button {
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #e9f4fc;
    font-size: 13px;
}

.share-status {
    min-height: 18px;
    margin: 10px 0 5px;
    font-size: 12px;
}

.share-dismiss {
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: var(--navy);
    color: white;
}

@media (max-width: 450px) {
    .share-dialog {
        padding: 22px 16px;
    }

    .share-dialog h2 {
        font-size: 27px;
    }

    .share-networks a {
        font-size: 12px;
        padding: 8px;
    }

    .share-preview img {
        width: 80px;
    }

    .share-utilities {
        grid-template-columns: 1fr;
    }
}

/* Une invitation chaleureuse remplace le libellé du modèle. */
.topline strong {
    font-weight: 600;
    color: #a63e43;
}

.topline-heart {
    margin-left: 6px;
    color: #cf5d5b;
    font: 22px/1 Georgia, serif;
}

@media (max-width: 600px) {
    .topline {
        gap: 3px;
        min-height: 32px;
        padding-inline: 8px;
        font-size: 10px;
        letter-spacing: .1px;
    }

    .topline-heart {
        font-size: 18px;
        margin-left: 3px;
    }
}
