/* =====================================================================
   Ma-famille.info — Design system « Verger »
   Direction chaleureuse & familiale : terracotta, sauge, neutres chauds.
   Accessibilité toutes générations : corps ≥ 17px, cibles ≥ 48px.
   ===================================================================== */

:root {
    /* Primaire — Terracotta */
    --terracotta-100: #F6E3DA;
    --terracotta-300: #E08A66;
    --terracotta-500: #C75B39;
    --terracotta-600: #B14E30;
    --terracotta-700: #8E3C24;

    /* Secondaire — Sauge */
    --sauge-100: #EDF0E3;
    --sauge-300: #A3B37C;
    --sauge-500: #7E8C5A;
    --sauge-600: #6F7D4D;
    --sauge-700: #55613A;

    /* Neutres chauds */
    --creme: #FBF5EC;
    --carte: #FFFFFF;
    --bordure: #EADDC9;
    --bordure-douce: #F0E8DB;
    --texte-discret: #8A7E70;
    --texte-secondaire: #5C5246;
    --moka: #33291F;
    --titre: #2E2620;

    /* Sémantiques */
    --succes: #6F7D4D;
    --erreur: #B3402E;
    --attention: #C8902E;

    /* Typo */
    --font-titre: 'Bricolage Grotesque', sans-serif;
    --font-corps: 'Figtree', sans-serif;

    /* Rayons */
    --radius-petit: 12px;
    --radius-bouton: 14px;
    --radius-carte: 18px;
    --radius-pilule: 999px;

    /* Ombres — toujours teintées brun chaud */
    --ombre-repos: 0 1px 3px rgba(60, 45, 30, 0.08);
    --ombre-carte: 0 2px 8px rgba(107, 74, 51, 0.10);
    --ombre-flottant: 0 6px 20px rgba(107, 74, 51, 0.18);
    --ombre-fab: 0 4px 12px rgba(199, 91, 57, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--creme);
    color: var(--moka);
    font-family: var(--font-corps);
    font-size: 17px;
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: var(--font-titre);
    color: var(--titre);
    margin: 0;
}

.t-display { font-family: var(--font-titre); font-weight: 700; font-size: 32px; line-height: 1.15; }
.t-titre   { font-family: var(--font-titre); font-weight: 700; font-size: 24px; line-height: 1.2; }
.t-sous-titre { font-family: var(--font-titre); font-weight: 600; font-size: 19px; line-height: 1.3; }
.t-legende { font-size: 14px; font-weight: 500; color: var(--texte-discret); line-height: 1.4; }

a { color: var(--terracotta-500); font-weight: 600; }
a:hover { color: var(--terracotta-600); }

/* =========================== Boutons =========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: var(--font-corps);
    font-weight: 700;
    font-size: 17px;
    padding: 0 26px;
    height: 52px;
    border-radius: var(--radius-bouton);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primaire { background: var(--terracotta-500); color: #FFFFFF; }
.btn-primaire:hover { background: var(--terracotta-600); color: #FFFFFF; }

.btn-secondaire { background: var(--carte); color: var(--terracotta-500); border: 2px solid var(--terracotta-500); }
.btn-secondaire:hover { background: var(--terracotta-100); color: var(--terracotta-600); }

.btn-sauge { background: var(--sauge-100); color: var(--sauge-700); }
.btn-sauge:hover { background: #DFE5CC; color: var(--sauge-700); }

.btn-discret { background: transparent; color: var(--texte-secondaire); font-weight: 600; padding: 0 20px; }
.btn-discret:hover { background: #F3EBDD; color: var(--texte-secondaire); }

.btn-danger { background: transparent; color: var(--erreur); font-weight: 600; }
.btn-danger:hover { background: #F8E4E0; color: var(--erreur); }

.btn:disabled { background: #EFE7DA; color: #B5A996; cursor: not-allowed; }

.btn-petit { font-size: 15px; font-weight: 600; padding: 0 18px; height: 44px; border-radius: var(--radius-petit); }
.btn-pilule { border-radius: var(--radius-pilule); }
.btn-hero { font-size: 18px; padding: 0 32px; height: 60px; border-radius: var(--radius-pilule); }

.btn-bloc { width: 100%; }

.fab {
    border: none;
    cursor: pointer;
    background: var(--terracotta-500);
    color: #FFFFFF;
    font-size: 28px;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-pilule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ombre-fab);
    text-decoration: none;
}
.fab:hover { background: var(--terracotta-600); color: #FFFFFF; }

/* Réactions / actions de post */
.btn-reaction {
    border: none;
    cursor: pointer;
    background: var(--creme);
    color: var(--texte-secondaire);
    font-family: var(--font-corps);
    font-size: 15px;
    font-weight: 600;
    padding: 0 16px;
    height: 44px;
    border-radius: var(--radius-pilule);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.btn-reaction:hover { background: #F3EBDD; color: var(--texte-secondaire); }
.btn-reaction.est-actif { background: var(--terracotta-100); color: var(--terracotta-700); }
.btn-reaction.est-actif:hover { background: #F0D5C7; }

/* =========================== Formulaires =========================== */

.champ { display: flex; flex-direction: column; gap: 8px; }

.champ label {
    font-size: 15px;
    font-weight: 600;
    color: var(--moka);
}

.champ input[type="text"],
.champ input[type="email"],
.champ input[type="password"],
.champ input[type="date"],
.champ input[type="time"],
.champ input[type="datetime-local"],
.champ select,
.champ textarea {
    font-family: var(--font-corps);
    font-size: 17px;
    color: var(--moka);
    background: var(--creme);
    border: 2px solid var(--bordure);
    border-radius: var(--radius-bouton);
    height: 52px;
    padding: 0 16px;
    outline: none;
    width: 100%;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.champ textarea {
    height: auto;
    min-height: 120px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.55;
}

.champ input:focus,
.champ select:focus,
.champ textarea:focus {
    border-color: var(--terracotta-500);
    background: var(--carte);
}

.champ.a-erreur label { color: var(--erreur); }
.champ.a-erreur input, .champ.a-erreur textarea { border-color: var(--erreur); background: var(--carte); }

.champ .aide { font-size: 13px; color: var(--texte-discret); }
.champ .message-erreur { font-size: 14px; font-weight: 500; color: var(--erreur); }

/* Interrupteur (checkbox stylée) */
.interrupteur {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--moka);
}
.interrupteur input { position: absolute; opacity: 0; width: 0; height: 0; }
.interrupteur .glissiere {
    flex-shrink: 0;
    width: 52px;
    height: 30px;
    border-radius: var(--radius-pilule);
    background: var(--bordure);
    position: relative;
    transition: background 0.2s ease;
}
.interrupteur .glissiere::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--carte);
    box-shadow: var(--ombre-repos);
    transition: transform 0.2s ease;
}
.interrupteur input:checked + .glissiere { background: var(--succes); }
.interrupteur input:checked + .glissiere::after { transform: translateX(22px); }
.interrupteur input:focus-visible + .glissiere { outline: 3px solid var(--terracotta-300); outline-offset: 2px; }

/* =========================== Cartes =========================== */

.carte {
    background: var(--carte);
    border-radius: var(--radius-carte);
    padding: 24px;
    box-shadow: var(--ombre-repos);
}

.zone-danger { border: 2px solid #F0D5CE; background: #FFF8F6; }

.carte-post {
    background: var(--carte);
    border-radius: var(--radius-carte);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--ombre-carte);
}

.carte-post .entete-post { display: flex; align-items: center; gap: 12px; }
.carte-post .entete-post .infos { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.carte-post .entete-post .nom { font-family: var(--font-titre); font-weight: 600; font-size: 17px; color: var(--moka); }
.carte-post .contenu { margin: 0; font-size: 17px; line-height: 1.55; color: var(--moka); white-space: pre-line; overflow-wrap: break-word; }
.carte-post .actions-post { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--bordure-douce); padding-top: 12px; }

/* Grille photos */
.grille-photos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: 280px; }
.grille-photos a { display: block; border-radius: var(--radius-petit); overflow: hidden; position: relative; }
.grille-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grille-photos a:first-child { grid-row: 1 / 3; }
.grille-photos.une-photo { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.grille-photos.deux-photos { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.grille-photos.deux-photos a:first-child { grid-row: auto; }
.grille-photos .reste-photos {
    position: absolute;
    inset: 0;
    background: rgba(51, 41, 31, 0.55);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-titre);
    font-weight: 700;
    font-size: 22px;
}
.grille-photos .photo-item { cursor: zoom-in; }

/* Mosaïque (mise en page par défaut au-delà de 2 photos) */
.grille-photos.montage-mosaique {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: none;
    grid-auto-rows: 130px;
    height: auto;
}
.grille-photos.montage-mosaique a:first-child { grid-row: auto; }
@media (max-width: 520px) {
    .grille-photos.montage-mosaique { grid-template-columns: repeat(2, 1fr); }
}

/* Liste du flux (espacement entre cartes) */
.liste-flux { display: flex; flex-direction: column; gap: 24px; }

/* Disposition du flux : pile sur mobile, colonne large + rail sur grand écran */
.flux-large { display: flex; flex-direction: column; gap: 24px; }

@media (min-width: 900px) {
    .contenu-principal > .flux-large { max-width: 760px; }
}

@media (min-width: 1180px) {
    /* Sans « À venir » : une seule colonne large, centrée. */
    .contenu-principal > .flux-large:not(:has(.zone-rail)) { max-width: 760px; }

    /* Avec « À venir » : timeline large à gauche, rail collant à droite. */
    .contenu-principal > .flux-large:has(.zone-rail) { max-width: 1080px; }
    .flux-large:has(.zone-rail) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        grid-template-areas:
            "titre   rail"
            "partage rail"
            "filtre  rail"
            "flux    rail";
        column-gap: 32px;
        row-gap: 24px;
        align-items: start;
    }
    .flux-large:has(.zone-rail) .zone-titre { grid-area: titre; }
    .flux-large:has(.zone-rail) .zone-partage { grid-area: partage; }
    .flux-large:has(.zone-rail) .zone-filtre { grid-area: filtre; }
    .flux-large:has(.zone-rail) .zone-flux { grid-area: flux; }
    .flux-large:has(.zone-rail) .zone-rail {
        grid-area: rail;
        position: sticky;
        top: 24px;
        align-self: start;
    }
}

/* Navigation par mois (archives) : ‹ Mois en cours › */
.nav-mois {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-mois-fleche {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--bordure);
    background: var(--carte);
    color: var(--terracotta-500);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.nav-mois-fleche:hover { background: var(--terracotta-100); border-color: var(--terracotta-300); color: var(--terracotta-700); }
.nav-mois-fleche.est-desactive { color: var(--bordure); cursor: default; }
.nav-mois-label {
    flex: 1;
    text-align: center;
    font-family: var(--font-titre);
    font-weight: 700;
    font-size: 17px;
    color: var(--moka);
    min-width: 0;
}
.nav-mois-reset {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: var(--texte-discret);
    padding: 0 6px;
}
.nav-mois-reset:hover { color: var(--terracotta-500); }

.chargement-flux { text-align: center; padding: 12px; }

/* Carte anniversaire (post automatique) */
.carte-anniversaire {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--terracotta-100) 100%);
    border: 2px solid var(--terracotta-300);
}

/* Bandeau événement */
.bandeau-evenement {
    background: var(--sauge-100);
    margin: -18px -18px 0;
    padding: 14px 18px;
    border-radius: var(--radius-carte) var(--radius-carte) 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.date-evenement {
    flex-shrink: 0;
    width: 52px;
    height: 56px;
    border-radius: var(--radius-petit);
    background: var(--carte);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(85, 97, 58, 0.2);
}
.date-evenement .mois { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--terracotta-500); text-transform: uppercase; }
.date-evenement .jour { font-family: var(--font-titre); font-size: 22px; font-weight: 700; color: var(--moka); line-height: 1; }
.bandeau-evenement .titre-evenement { font-family: var(--font-titre); font-weight: 700; font-size: 18px; color: var(--moka); }
.bandeau-evenement .detail-evenement { font-size: 14px; font-weight: 500; color: var(--sauge-700); }

/* =========================== Avatars & badges =========================== */

.avatar {
    flex-shrink: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-titre);
    font-weight: 700;
    color: #FFFFFF;
    user-select: none;
}
.avatar-64 { width: 64px; height: 64px; font-size: 24px; }
.avatar-48 { width: 48px; height: 48px; font-size: 19px; }
.avatar-36 { width: 36px; height: 36px; font-size: 15px; }
.avatar-photo { object-fit: cover; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-pilule);
}
.badge-terracotta { background: var(--terracotta-100); color: var(--terracotta-700); }
.badge-sauge { background: var(--sauge-100); color: var(--sauge-700); }
.badge-neutre { background: var(--creme); color: var(--texte-secondaire); border: 1px solid var(--bordure); }
.badge-plein { background: var(--terracotta-500); color: #FFFFFF; font-size: 13px; font-weight: 700; padding: 4px 10px; }

/* =========================== Layout =========================== */

.contenu-principal {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 16px 120px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* En-tête mobile */
.entete-mobile {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(251, 245, 236, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--bordure-douce);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Barre d'onglets mobile */
.barre-onglets {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: var(--carte);
    box-shadow: 0 -2px 12px rgba(107, 74, 51, 0.10);
    display: flex;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.barre-onglets .onglet {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 0;
    border-radius: var(--radius-petit);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--texte-discret);
}
.barre-onglets .onglet svg { stroke: var(--texte-discret); }
.barre-onglets .onglet.est-actif { background: var(--terracotta-100); color: var(--terracotta-500); font-weight: 700; }
.barre-onglets .onglet.est-actif svg { stroke: var(--terracotta-500); }
.barre-onglets .onglet-fab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.barre-onglets .onglet-fab a {
    width: 48px;
    height: 48px;
    margin-top: -4px;
    border-radius: var(--radius-pilule);
    background: var(--terracotta-500);
    color: #FFFFFF;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ombre-fab);
    text-decoration: none;
}

/* Sidebar desktop */
.menu-lateral {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 260px;
    background: var(--carte);
    border-right: 1px solid var(--bordure-douce);
    padding: 24px 14px;
    flex-direction: column;
    gap: 4px;
    z-index: 40;
}
.menu-lateral .marque {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 20px;
    text-decoration: none;
}
.menu-lateral .lien-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-petit);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--texte-secondaire);
}
.menu-lateral .lien-menu svg { stroke: var(--texte-secondaire); }
.menu-lateral .lien-menu:hover { background: var(--creme); color: var(--texte-secondaire); }
.menu-lateral .lien-menu.est-actif { background: var(--terracotta-100); color: var(--terracotta-500); font-weight: 700; }
.menu-lateral .lien-menu.est-actif svg { stroke: var(--terracotta-500); }
.menu-lateral .pied-menu { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }

/* Sélecteur de famille en haut de la sidebar */
.selecteur-famille { padding: 0 14px 12px; }
.selecteur-famille select {
    width: 100%;
    font-family: var(--font-titre);
    font-weight: 600;
    font-size: 16px;
    color: var(--moka);
    background: var(--creme);
    border: 2px solid var(--bordure);
    border-radius: var(--radius-bouton);
    height: 46px;
    padding: 0 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A7E70' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.selecteur-famille select:hover { border-color: var(--terracotta-300); }
.selecteur-famille select:focus { outline: none; border-color: var(--terracotta-500); background-color: var(--carte); }
.famille-courante {
    padding: 10px 14px;
    margin: 0 14px 12px;
    font-family: var(--font-titre);
    font-weight: 600;
    font-size: 16px;
    color: var(--moka);
    background: var(--creme);
    border-radius: var(--radius-bouton);
}

.nom-marque { display: flex; flex-direction: column; line-height: 1.15; }
.nom-marque .principal { font-family: var(--font-titre); font-weight: 700; font-size: 20px; color: var(--moka); }
.nom-marque .extension { font-weight: 600; font-size: 10px; letter-spacing: 0.18em; color: var(--terracotta-500); }

@media (min-width: 900px) {
    .menu-lateral { display: flex; }
    .barre-onglets, .entete-mobile { display: none; }
    .contenu-principal { margin-left: 260px; padding: 40px 32px 80px; max-width: none; }
    .contenu-principal > * { width: 100%; max-width: 680px; margin-left: auto; margin-right: auto; }
}

/* =========================== Flashs =========================== */

.zone-flash {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
@media (min-width: 900px) {
    .zone-flash { left: auto; width: 380px; }
}
.flash {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-bouton);
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--ombre-flottant);
    background: var(--carte);
    color: var(--moka);
    border-left: 5px solid var(--succes);
}
.flash-error { border-left-color: var(--erreur); color: var(--erreur); }

/* =========================== Divers =========================== */

.liste-membres { display: flex; flex-direction: column; gap: 4px; }
.ligne-membre {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-petit);
}
.ligne-membre:hover { background: var(--creme); }
.ligne-membre .infos { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ligne-membre .nom { font-weight: 600; color: var(--moka); }

.code-famille {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--sauge-100);
    border: 2px dashed var(--sauge-300);
    border-radius: var(--radius-bouton);
    padding: 14px 18px;
}
.code-famille .code {
    font-family: var(--font-titre);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.06em;
    color: var(--sauge-700);
}

.separateur { border: none; border-top: 1px solid var(--bordure-douce); margin: 4px 0; }

.etat-vide {
    text-align: center;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.etat-vide .gros-emoji { font-size: 44px; }

/* Pages d'authentification (sans navigation) */
.page-auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    gap: 28px;
}
.page-auth .carte { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 20px; padding: 32px 28px; }

.commentaire {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.commentaire .bulle {
    background: var(--creme);
    border-radius: 4px 16px 16px 16px;
    padding: 10px 14px;
    flex: 1;
    min-width: 0;
}
.commentaire .bulle .auteur { font-size: 14px; font-weight: 700; color: var(--moka); }
.commentaire .bulle p { margin: 2px 0 0; font-size: 15px; line-height: 1.5; overflow-wrap: break-word; }

.formulaire-commentaire { display: flex; gap: 8px; align-items: center; }
.formulaire-commentaire input {
    flex: 1;
    font-family: var(--font-corps);
    font-size: 15px;
    color: var(--moka);
    background: var(--creme);
    border: 2px solid var(--bordure);
    border-radius: var(--radius-pilule);
    height: 44px;
    padding: 0 16px;
    outline: none;
}
.formulaire-commentaire input:focus { border-color: var(--terracotta-500); background: var(--carte); }

/* Édition « sur place » d'un commentaire */
.edition-commentaire { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; }
.edition-commentaire input[type="text"] {
    flex: 1;
    min-width: 160px;
    font-family: var(--font-corps);
    font-size: 15px;
    color: var(--moka);
    background: var(--carte);
    border: 2px solid var(--terracotta-300);
    border-radius: var(--radius-pilule);
    height: 44px;
    padding: 0 16px;
    outline: none;
}
.edition-commentaire input[type="text"]:focus { border-color: var(--terracotta-500); }

/* Onglets type de post */
.onglets-type { display: flex; gap: 8px; flex-wrap: wrap; }
.onglet-type {
    border: 2px solid var(--bordure);
    background: var(--carte);
    color: var(--texte-secondaire);
    font-family: var(--font-corps);
    font-size: 15px;
    font-weight: 600;
    padding: 0 18px;
    height: 48px;
    border-radius: var(--radius-pilule);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.onglet-type.est-actif { border-color: var(--terracotta-500); background: var(--terracotta-100); color: var(--terracotta-700); font-weight: 700; }

.apercu-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.apercu-photos img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-petit); display: block; }

/* Sélecteur de photos convivial */
.zone-depot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    background: var(--creme);
    border: 2px dashed var(--bordure);
    border-radius: 14px;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--texte-secondaire);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.zone-depot:hover { border-color: var(--terracotta-300); background: var(--terracotta-100); color: var(--terracotta-700); }

.vignette { position: relative; width: 84px; height: 84px; }
.vignette img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-petit); }
.vignette-retirer {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--carte);
    background: var(--erreur);
    color: #FFFFFF;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ombre-repos);
}
.vignette-retirer:hover { background: #8E2F22; }

/* =========================== Page d'accueil publique =========================== */

.page-accueil {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.entete-accueil {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.heros {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    padding-top: 24px;
}
.texte-heros { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.visuel-heros { max-width: 460px; width: 100%; justify-self: center; }

@media (min-width: 900px) {
    .heros { grid-template-columns: 1.1fr 0.9fr; }
}

.section-accueil {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 40px 24px;
}

.grille-fonctionnalites {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.fonctionnalite { display: flex; flex-direction: column; gap: 10px; }
.fonctionnalite p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--texte-secondaire); }
.icone-fonctionnalite {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-bouton);
    background: var(--terracotta-100);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.grille-etapes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.etape { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.etape p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--texte-secondaire); }
.numero-etape {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--terracotta-500);
    color: #FFFFFF;
    font-family: var(--font-titre);
    font-weight: 700;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pied-accueil { padding: 24px 0 8px; border-top: 1px solid var(--bordure-douce); }

/* =========================== Lightbox =========================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(28, 22, 16, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 8px;
}
.lightbox-figure {
    margin: 0;
    max-width: min(1100px, 92vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lightbox-figure img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-figure figcaption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}
.lightbox button {
    border: none;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 30px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-fermer { position: absolute; top: 16px; right: 16px; }
.lightbox-compteur {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
}
@media (max-width: 640px) {
    .lightbox { padding: 12px; }
    .lightbox-prec, .lightbox-suiv { width: 44px; height: 44px; font-size: 26px; }
    .lightbox-fermer { top: 10px; right: 10px; }
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
