/* ============================================================
   Galerie PhotolikeByAlain : feuille de style de base (charte fine art).
   Couleurs, typographies et reperes communs a toutes les pages admin.
   Se completera au fil des blocs (photos, navigation client...).
   ============================================================ */

/* Polices locales (a deposer dans assets/fonts/). Si les fichiers ne
   sont pas encore la, le navigateur utilise une police de repli propre. */
@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Cormorant Garamond";
    src: url("fonts/CormorantGaramond-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "DM Sans";
    src: url("fonts/DMSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "DM Sans";
    src: url("fonts/DMSans-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

:root {
    --creme: #FDFAF7;
    --terracotta: #C4856A;
    --terracotta-fonce: #A96C52;
    --anthracite: #2E2823;
    --gris: #8A8078;
    --ligne: #E9E1D9;
    --blanc: #FFFFFF;

    --serif: "Cormorant Garamond", Cormorant, Garamond, Georgia, serif;
    --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--creme);
    color: var(--anthracite);
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: .2px;
    margin: 0 0 .4em;
    line-height: 1.15;
}
h1 { font-size: 34px; }
h2 { font-size: 22px; color: var(--terracotta-fonce); }

a { color: var(--terracotta-fonce); }

.enveloppe {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.marque {
    font-family: var(--serif);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--terracotta);
    margin-bottom: 6px;
}

.sous-titre {
    color: var(--gris);
    margin-top: -4px;
}

/* Trait fin de separation, pas d'ombre lourde ni de couleur criarde. */
.filet {
    height: 1px;
    background: var(--ligne);
    border: 0;
    margin: 28px 0;
}

.carte {
    background: var(--blanc);
    border: 1px solid var(--ligne);
    border-radius: 4px;
    padding: 26px 28px;
}

.note {
    color: var(--gris);
    font-size: 13px;
    margin-top: 22px;
}

/* ---- En-tete et menu (pages admin connectees) ---- */
.entete-appli {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 32px;
    background: var(--blanc);
    border-bottom: 1px solid var(--ligne);
    flex-wrap: wrap;
}
.entete-marque {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.entete-marque .marque { margin: 0; }
.badge-projet {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--gris);
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 2px 7px;
}
.nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
}
.nav a {
    color: var(--anthracite);
    text-decoration: none;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--terracotta-fonce); }
.nav a.actif {
    color: var(--terracotta-fonce);
    border-bottom-color: var(--terracotta);
}
.nav-deconnexion { color: var(--gris) !important; }

.pied-appli {
    text-align: center;
    color: var(--gris);
    font-size: 12px;
    letter-spacing: 1px;
    padding: 28px 0 40px;
}

/* ---- Formulaires ---- */
.champ {
    display: block;
    margin: 0 0 16px;
}
.champ > span {
    display: block;
    font-size: 13px;
    color: var(--gris);
    margin-bottom: 5px;
}
.champ input,
.champ select,
.champ textarea {
    width: 100%;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--anthracite);
    background: var(--blanc);
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 10px 12px;
}
.champ input:focus,
.champ select:focus,
.champ textarea:focus {
    outline: none;
    border-color: var(--terracotta);
}

/* Champ mot de passe avec bouton "afficher/masquer" integre a droite. */
.champ-mdp {
    position: relative;
    display: block;
}
.champ-mdp input {
    padding-right: 78px;
}
.btn-oeil {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    padding: 0 12px;
    font-family: var(--sans);
    font-size: 13px;
    color: var(--terracotta-fonce);
    background: none;
    border: none;
    cursor: pointer;
}
.btn-oeil:hover { text-decoration: underline; }

.btn {
    font-family: var(--sans);
    font-size: 15px;
    cursor: pointer;
    border-radius: 3px;
    padding: 10px 22px;
    border: 1px solid var(--terracotta);
    background: var(--blanc);
    color: var(--terracotta-fonce);
}
.btn:hover { background: #FBF4EF; }
.btn-primaire {
    background: var(--terracotta);
    color: var(--blanc);
}
.btn-primaire:hover { background: var(--terracotta-fonce); }
.btn-danger { border-color: #C08476; color: #9B4A3D; }
.btn-danger:hover { background: #FBF1EF; }
.btn-desactive { opacity: .45; pointer-events: none; }

/* ---- Modal formulaire de contact "galerie complète" (teaser) ------------ */
.modal-teaser-fond {
    position: fixed;
    inset: 0;
    background: rgba(46,40,35,.55);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-teaser-carte {
    background: var(--creme);
    border: 1px solid var(--ligne);
    border-radius: 4px;
    padding: 28px;
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-teaser-titre {
    font-family: var(--serif);
    font-size: 22px;
    margin: 0 0 4px;
    color: var(--anthracite);
}
.modal-teaser-tarif {
    margin: 0 0 8px;
    font-size: 15px;
}

/* ---- Notification "limite de pack atteinte" (galerie invites) ----------- */
.notif-limite-pack {
    position: fixed;
    bottom: 90px; /* au-dessus de la barre de selection */
    left: 50%;
    transform: translateX(-50%);
    width: min(400px, 92vw);
    background: #FBF3E6;
    border: 1px solid var(--terracotta);
    border-radius: 4px;
    padding: 14px 44px 14px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.14);
    z-index: 300;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.notif-limite-corps { flex: 1; }
.notif-limite-titre {
    margin: 0 0 4px;
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 600;
    color: var(--anthracite);
}
.notif-limite-texte {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--anthracite);
    line-height: 1.4;
}
.notif-limite-contact {
    margin: 0;
    font-size: 12px;
    color: var(--gris);
}
.notif-limite-contact a { color: var(--terracotta); text-decoration: none; }
.notif-limite-contact a:hover { text-decoration: underline; }
.notif-limite-fermer {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gris);
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}

/* ---- Messages (sobres, pas de banniere criarde) ---- */
.message {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 3px;
    margin: 0 0 18px;
    border: 1px solid var(--ligne);
}
.message.erreur {
    border-color: #C89A90;
    color: #9B4A3D;
    background: #FBF1EF;
}
.message.succes {
    border-color: var(--terracotta);
    color: var(--terracotta-fonce);
    background: #FBF4EF;
}
.message.avertissement {
    border-color: #D9B48A;
    color: #8A6534;
    background: #FBF3E6;
}

/* ---- Couverture personnalisee de la page d'acces client (bloc 13) ---- */
.couverture-page { margin: 0; background: var(--creme); }
.couverture-galerie {
    width: 100%;
    height: 100vh;
    min-height: 480px;
    padding: 7vh 0;
    background: var(--creme);
}
.couverture-interieur {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.couverture-bandeau-titre {
    flex: 0 0 auto;
    background: var(--terracotta);
    padding: 20px 24px;
    text-align: center;
}
.couverture-photo-zone {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--terracotta);
}
.couverture-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.couverture-nom-studio {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    writing-mode: vertical-rl;
    font-family: var(--serif);
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--terracotta);
    text-shadow: 0 0 6px rgba(255,255,255,0.85), 0 0 3px rgba(255,255,255,0.7);
}
.couverture-bandeau-titre h1 {
    margin: 0;
    color: var(--creme);
}
.couverture-bandeau-titre p {
    margin: 4px 0 0;
    color: var(--creme);
    font-size: 14px;
    opacity: 0.9;
}
.couverture-formulaire {
    position: absolute;
    left: 50%;
    bottom: 8vh;
    transform: translateX(-50%);
    width: 100%;
    max-width: 360px;
    padding: 24px 26px;
    background: rgba(253,250,247,0.94);
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
    .couverture-formulaire { bottom: 5vh; max-width: calc(100% - 40px); }
    .couverture-bandeau-titre { padding: 14px 20px; }
}

/* ---- Meme bandeau, en haut de l'ecran de navigation post-connexion
   (bloc 15) : pas de formulaire, juste la photo et une fleche de defilement
   vers le contenu (onglets, vignettes) juste en dessous. ---- */
.couverture-galerie-nav { height: 88vh; }
.couverture-nav-fleche {
    position: absolute;
    left: 50%;
    bottom: 4vh;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(253,250,247,0.85);
    color: var(--terracotta);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
    animation: couverture-nav-fleche-rebond 1.8s ease-in-out infinite;
}
@keyframes couverture-nav-fleche-rebond {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}
@media (max-width: 600px) {
    .couverture-galerie-nav { height: 70vh; min-height: 420px; }
}

/* ---- Ecran de connexion / creation de compte ---- */
.connexion-page {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 8vh 20px 40px;
}
.connexion-carte {
    width: 100%;
    max-width: 400px;
    background: var(--blanc);
    border: 1px solid var(--ligne);
    border-radius: 4px;
    padding: 34px 32px 30px;
}
.connexion-carte h1 { font-size: 28px; margin-top: 6px; }
.connexion-carte .btn { width: 100%; margin-top: 6px; }

/* ---- Titres avec actions a droite ---- */
.titre-ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.titre-ligne h1 { margin: 0; }
.titre-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.formulaire-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

.fil { color: var(--gris); font-size: 13px; margin: 0 0 6px; }
.fil a { color: var(--gris); }

/* ---- Disposition en colonnes ---- */
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grille-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 680px) {
    .grille-2 { grid-template-columns: 1fr; }
    .grille-3 { grid-template-columns: 1fr; }
}
.sous-section {
    font-size: 15px;
    color: var(--anthracite);
    margin: 22px 0 6px;
    padding-top: 14px;
    border-top: 1px solid var(--ligne);
}
code {
    font-family: "DM Mono", Consolas, monospace;
    font-size: 13px;
    background: #F4EEE8;
    padding: 1px 5px;
    border-radius: 2px;
    color: var(--terracotta-fonce);
}

/* ---- Tableaux de donnees ---- */
.tableau {
    width: 100%;
    border-collapse: collapse;
    background: var(--blanc);
    border: 1px solid var(--ligne);
    border-radius: 4px;
    overflow: hidden;
}
.tableau th, .tableau td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ligne);
    font-size: 14px;
    vertical-align: middle;
}
.tableau thead th {
    font-weight: 500;
    font-size: 12px;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--gris);
    background: #FBF7F3;
}
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr.cliquable { cursor: pointer; }
.tableau tbody tr.cliquable:hover { background: #FBF7F3; }
.tableau a { text-decoration: none; }
.tableau a:hover { text-decoration: underline; }
.col-actions { white-space: nowrap; }
.col-actions > * { margin-right: 14px; }
.col-actions > *:last-child { margin-right: 0; }
.col-prix { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tableau tr.inactif td { color: var(--gris); }
.tableau tr.inactif strong { font-weight: 400; }

table.infos { width: 100%; border-collapse: collapse; margin-top: 4px; }
table.infos th, table.infos td {
    text-align: left;
    padding: 9px 4px;
    border-bottom: 1px solid var(--ligne);
    font-size: 14px;
    vertical-align: top;
}
table.infos th { font-weight: 500; color: var(--gris); width: 32%; }
table.infos tr:last-child th, table.infos tr:last-child td { border-bottom: 0; }

/* ---- Badges de statut (sobres) ---- */
.badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: .4px;
    padding: 2px 9px;
    border-radius: 2px;
    border: 1px solid var(--ligne);
    color: var(--gris);
    background: var(--creme);
    vertical-align: middle;
}
.badge-confirme { border-color: var(--terracotta); color: var(--terracotta-fonce); }
.badge-archive  { border-color: #CFCAC4; color: #9A938B; }
.badge-danger   { border-color: #C08476; color: #9B4A3D; }

.date-action { color: var(--gris); font-size: 13px; white-space: nowrap; }

/* Liste de noms de fichiers (ecran detail d'une sortie), copiable. */
.liste-noms {
    width: 100%;
    font-family: "DM Mono", Consolas, monospace;
    font-size: 13px;
    color: var(--anthracite);
    background: var(--creme);
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 10px 12px;
    resize: vertical;
}

/* ---- Onglets (pool / sous-dossiers) ---- */
.onglets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 1px solid var(--ligne);
    margin-bottom: 16px;
}
.onglet {
    text-decoration: none;
    color: var(--gris);
    font-size: 14px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    margin-bottom: -1px;
}
.onglet:hover { color: var(--terracotta-fonce); }
.onglet.actif {
    color: var(--anthracite);
    background: var(--blanc);
    border-color: var(--ligne);
    border-bottom-color: var(--blanc);
}
.onglet-groupe { display: inline-flex; align-items: center; }
.en-ligne { display: inline; }
.onglet-suppr {
    background: none;
    border: none;
    padding: 4px 8px 4px 2px;
    margin-bottom: -1px;
    font-size: 12px;
    color: var(--gris);
    cursor: pointer;
}
.onglet-suppr:hover { color: #9B4A3D; }

/* ---- Barre d'action au-dessus de la grille de photos ---- */
.barre-action-photos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--blanc);
    border: 1px solid var(--ligne);
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 14px;
    position: sticky;
    top: 0;
    z-index: 5;
}
/* Bloc impressions : separe visuellement de la barre de selection
   au-dessus (fond legerement teinte + titre), pour qu'aucune ambiguite ne
   soit possible entre "Valider ma selection" et "Valider mes
   impressions" (les deux actions sont totalement independantes). Pas de
   position sticky ici : seule la barre de selection reste fixee en haut,
   deux barres sticky empilees se chevaucheraient au defilement. */
.barre-impressions {
    position: static;
    background: #FBF7F3;
    margin-top: 4px;
}
.barre-titre {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--terracotta-fonce);
    margin-right: 4px;
}

.teaser-bloc {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.teaser-accroche-invite {
    font-size: 12px;
    color: var(--gris);
    line-height: 1.4;
    padding: 6px 10px;
    background: #FBF3E6;
    border: 1px solid var(--ligne);
    border-radius: 3px;
}
.teaser-accroche-invite strong {
    color: var(--anthracite);
    font-weight: 600;
}
.teaser-prix-barre {
    text-decoration: line-through;
    opacity: .65;
}

/* ---- Compte a rebours du tarif reduit (bloc 16) : compact, pense mobile
   d'abord (moins massif qu'un gros pave, quitte a etre discret) ---- */
.teaser-compte-a-rebours {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 6px;
    padding: 5px 10px;
    background: #FBF3E6;
    border: 1px solid var(--ligne);
    border-radius: 3px;
    font-size: 12px;
    transition: border-color .2s ease;
}
.teaser-compte-a-rebours:hover { border-color: var(--terracotta); }
.teaser-cr-intro,
.teaser-cr-texte {
    margin: 0;
    color: var(--gris);
}
.teaser-cr-chiffres {
    white-space: nowrap;
}
.teaser-cr-legende {
    font-size: 9px;
    color: var(--gris);
    opacity: .8;
}
.teaser-cr-nombre {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    color: var(--terracotta-fonce);
}
.teaser-cr-nombre.teaser-cr-maj { animation: teaser-cr-flash .4s ease; }
@keyframes teaser-cr-flash {
    0%   { opacity: .3; }
    100% { opacity: 1; }
}
.teaser-cr-sep {
    font-size: 13px;
    color: var(--gris);
    margin: 0 2px;
}
.barre-action-photos select,
.barre-action-photos input[type="text"] {
    font-family: var(--sans);
    font-size: 14px;
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 8px 10px;
    background: var(--blanc);
}

/* ---- Grille de miniatures (responsive, verifiee au format mobile) ---- */
.grille-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
/* ---- Titre de dossier dans la vue "Toutes les photos" (bloc 17) ---- */
.section-photos-titre {
    font-size: 18px;
    color: var(--terracotta-fonce);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--ligne);
}
.section-photos-titre:first-child { margin-top: 4px; }
.vignette-photo {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--ligne);
}
.vignette-photo-case {
    position: absolute;
    inset: 0;
    display: block;
    cursor: pointer;
}
.vignette-photo-case img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* ---- Vignette cliquable en lecture seule (detail d'une demande recue,
   bloc 19) : pas de case a cocher, juste un agrandissement au clic. ---- */
.vignette-envoi {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--ligne);
    padding: 0;
    background: none;
    cursor: pointer;
    display: block;
}
.vignette-envoi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-vignette-envoi { width: 52px; }
.col-vignette-envoi .vignette-envoi { width: 44px; height: 44px; aspect-ratio: unset; }
.vignette-photo-case input[type="checkbox"] {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    accent-color: var(--terracotta);
    z-index: 2;
}
.vignette-photo:has(.case-photo:checked) { outline: 3px solid var(--terracotta); outline-offset: -3px; }
.etiquette-couverture {
    position: absolute;
    bottom: 6px;
    right: 6px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--blanc);
    background: rgba(46,40,35,0.55);
    border-radius: 3px;
    padding: 3px 7px;
    cursor: pointer;
}
.etiquette-couverture.actif { background: var(--terracotta); }
.etiquette-couverture input { margin: 0; accent-color: var(--blanc); }

.lien-danger { color: #9B4A3D; text-decoration: none; }
.lien-danger:hover { text-decoration: underline; }

/* ---- Vignettes cote client (agrandissement + box de selection) ----
   Nom de fichier affiche en PERMANENCE sous chaque vignette (pas au
   survol, inutilisable au doigt sur mobile) : certains invites donnent un
   nom/numero de photo par telephone a Alain pour qu'il gere l'impression
   a leur place. row-gap agrandi + liseret sous chaque vignette (plutot
   que sur .grille-photos, partagee avec la grille admin du bloc 4) pour
   qu'une rangee ne se confonde jamais avec le nom de la rangee suivante,
   la grille etant deja dense. */
.grille-photos-client { row-gap: 20px; }
.vignette-client-wrap {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ligne);
}
/* Zone de l'image : c'est ELLE qui sert d'ancre au coeur et a la case
   album (position:absolute), pas le wrapper entier. Sans cette zone
   dediee, ajouter le nom de fichier en-dessous agrandit le wrapper et
   decale "bottom:6px" de la case album vers le bas du texte, provoquant
   un chevauchement (bug trouve et corrige avant meme de le soumettre). */
.vignette-client-zone { position: relative; }
.vignette-client {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--ligne);
    border-radius: 3px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: none;
}
.vignette-client img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nom-fichier-vignette {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: var(--gris);
    text-align: center;
    line-height: 1.3;
    word-break: break-all;
}

.vignette-recap {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--ligne);
    border-radius: 3px;
    overflow: hidden;
}
.vignette-recap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.etiquette-album { position: absolute; bottom: 6px; left: 6px; }

/* ---- Bouton "coeur" (ajouter/retirer de la box) ---- */
.btn-coeur {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--ligne);
    background: rgba(255, 255, 255, 0.85);
    color: var(--gris);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.btn-coeur.actif { color: var(--blanc); background: var(--terracotta); border-color: var(--terracotta); }
/* Vente additionnelle (supplement/invites) : couleur distincte de la box
   principale, pour qu'un client ne confonde jamais les deux au premier
   coup d'oeil (retour d'Alain, bloc 7). */
.btn-coeur.actif-vente { background: var(--anthracite); border-color: var(--anthracite); }

/* ---- Case "album" (independante du quota) ---- */
.case-album {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--blanc);
    background: rgba(46, 40, 35, 0.65);
    border-radius: 3px;
    padding: 3px 7px;
    z-index: 2;
}
.case-album input { accent-color: var(--terracotta); }
.case-album.masquee { display: none; }

/* ---- Lightbox (vue detaillee, version non recadree) ----
   Colonne (image en haut, bandeau de box en bas si present) plutot qu'un
   simple centrage : une photo quasi plein ecran (jusqu'a 90vh) chevauchait
   sinon le bandeau de la box, le rendant invisible ou hors champ sur un
   ecran/une fenetre moins haute (bug trouve au test manuel du bloc 6). Le
   bandeau reserve maintenant sa propre place, jamais superpose a l'image. */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(46, 40, 35, 0.92);
    display: flex;
    flex-direction: column;
    z-index: 50;
}
/* Une regle du site a la meme priorite qu'une regle par defaut du
   navigateur l'emporte toujours sur elle : sans cette ligne, l'attribut
   HTML "hidden" est ignore et .lightbox { display: flex } s'applique
   quand meme, affichant le voile des le chargement de la page. */
.lightbox[hidden] {
    display: none;
}

.lightbox-zone-image {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Nom de fichier, harmonise avec la grille (voir .nom-fichier-vignette) :
   absent jusqu'ici de la lightbox, ajoute pour rester coherent. */
.lightbox-nom-fichier {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(46, 40, 35, 0.65);
    color: var(--creme);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 3px;
    max-width: 90%;
    text-align: center;
    word-break: break-all;
    pointer-events: none;
}
.lightbox img {
    max-width: 90vw;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-fermer {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: var(--creme);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
    z-index: 2;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--creme);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 16px;
}
.lightbox-prec { left: 6px; }
.lightbox-suiv { right: 6px; }
@media (max-width: 680px) {
    .lightbox-nav { font-size: 34px; padding: 8px 10px; }
}

/* ---- Bandeau de box dans la lightbox : toujours a sa propre place,
   jamais en chevauchement avec l'image (voir note ci-dessus). Boutons
   agrandis par rapport a la grille : zone tactile plus confortable, en
   particulier sur mobile. ---- */
.lightbox-box {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 16px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
}
.lightbox-box .btn-coeur {
    position: static;
    width: 44px;
    height: 44px;
    font-size: 20px;
}
.lightbox-box .case-album {
    position: static;
    font-size: 13px;
    padding: 8px 14px;
}
/* Deux groupes cote a cote : coeur+compteur Box (la selection), case
   album+compteur Album (l'etiquette). Un seul separateur ENTRE les deux
   groupes, pas un par compteur, pour que chaque controle reste associe
   visuellement a son propre compteur plutot que d'etre isole entre eux. */
.lightbox-groupe {
    display: flex;
    align-items: center;
    gap: 10px;
}
.lightbox-groupe-separee {
    padding-left: 16px;
    margin-left: 4px;
    border-left: 1px solid rgba(253, 250, 247, 0.35);
}
.lightbox-compteur {
    color: var(--creme);
    font-size: 13px;
}

/* ---- Panneau "Impressions" dans la lightbox ---- */
.lightbox-impressions {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 14px;
    padding: 12px 14px;
    background: rgba(253, 250, 247, 0.08);
    border-radius: 4px;
    max-height: 40vh;
    overflow-y: auto;
}
.ligne-impression {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(253, 250, 247, 0.15);
}
.ligne-impression:last-child { border-bottom: 0; }
.ligne-impression .nom-format {
    flex: 1 1 auto;
    color: var(--creme);
    font-size: 13px;
}
.ligne-impression .nom-format em { color: var(--gris); font-style: normal; font-size: 11px; }
.ligne-impression .prix-format {
    color: var(--creme);
    font-size: 12px;
    opacity: .75;
    white-space: nowrap;
}
.ligne-impression .qte-format {
    width: 56px;
    font-family: var(--sans);
    font-size: 14px;
    border: 1px solid var(--ligne);
    border-radius: 3px;
    padding: 5px 6px;
    text-align: center;
}

.lien-bouton {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 13px;
    color: var(--terracotta-fonce);
    cursor: pointer;
    text-decoration: none;
}
.lien-bouton:hover { text-decoration: underline; }
