/* debacker.ca — espace famille et pages d'accès (complète site.css) */

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

.page { max-width: var(--largeur); margin: 0 auto; padding: 120px var(--gouttiere) 80px; min-height: 70vh; }

/* ---------- Bande de titre ----------
   Sous l'en-tête, le fil d'Ariane et le titre de la page sont posés sur une bande pleine largeur
   un ton plus soutenu que le fond (--titre-fond), dans le prolongement de l'en-tête. */

body.famille .page { padding-top: 0; }
body.famille .page::before { content: ""; display: block; height: 72px; }
body.famille .page::before,
body.famille .page > .fil,
body.famille .page > .fil + .bandeau,
body.famille:not(.page-video) .page > .bandeau:first-of-type {
  background: var(--titre-fond);
  box-shadow: 0 0 0 100vmax var(--titre-fond);
  clip-path: inset(0 -100vmax);
}
body.famille .page > .fil { margin: 0; padding: 22px 0 10px; }
body.famille .page > .fil + .bandeau,
body.famille:not(.page-video) .page > .bandeau:first-of-type { padding-top: 18px; padding-bottom: 34px; margin-bottom: 34px; }
body.famille .page > .fil:not(:has(+ .bandeau)) { padding-bottom: 26px; margin-bottom: 30px; }

/* ---------- Navigation ---------- */

.nav-famille { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav-famille > a { text-decoration: none; opacity: .8; }
.nav-famille > a:hover { opacity: 1; }
.menu-compte { position: relative; }
.menu-compte summary { list-style: none; cursor: pointer; }
.menu-compte summary::-webkit-details-marker { display: none; }
.pastille {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--encre); color: var(--papier); font: 500 16px/1 var(--sans);
}
.menu-compte-liste {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 8px;
  background: var(--carte); border-radius: 12px; box-shadow: 0 18px 50px rgba(20, 30, 38, .18); z-index: 30;
}
.menu-compte-liste p { margin: 0; padding: 10px 12px 12px; border-bottom: 1px solid var(--filet); font-weight: 500; }
.menu-compte-liste small { display: block; font-weight: 400; color: var(--discret); font-size: 12px; }
.menu-compte-liste a, .menu-compte-liste button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px;
  text-decoration: none; background: none; border: 0; cursor: pointer; font-size: 14px;
}
.menu-compte-liste a:hover, .menu-compte-liste button:hover { background: var(--papier); }

/* ---------- Messages ---------- */

.flash { padding: 14px 18px; border-radius: 10px; margin: 0 0 24px; font-size: 15px; }
.flash-ok { background: #e3efe6; color: #23502f; }
.flash-erreur { background: #f7e1dc; color: #7c2a1c; }
.flash-info { background: #e4ecf3; color: #2b4560; }

.vide { text-align: center; color: var(--discret); padding: 60px 0; font-size: 17px; }

/* ---------- Bandeaux ---------- */

.bandeau { padding: clamp(30px, 6vw, 70px) 0 clamp(30px, 4vw, 50px); }
.bandeau h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 400; }
.bandeau h1 em { color: var(--or); }
.bandeau-texte { max-width: 640px; color: var(--encre-douce); font-size: 18px; margin: 18px 0 0; }
.bandeau-section { padding-top: 10px; }
.bandeau-section h1 { font-size: clamp(36px, 5vw, 60px); }
.bandeau .bouton { margin-top: 24px; }
.fil { font-size: 13px; color: var(--discret); margin-bottom: 8px; }
.fil a { text-decoration: none; color: var(--encre-douce); }
.fil a:hover { text-decoration: underline; }
.fil span { margin: 0 6px; opacity: .5; }
.titre-bloc { font-size: 32px; margin: 0 0 24px; }
.bloc { margin-top: clamp(50px, 7vw, 90px); }

/* ---------- Cartes de sections ---------- */

.grille-sections { display: flex; flex-direction: column; gap: 12px; }
/* Une tuile par ligne : photo « icône » à gauche, texte au milieu, nouveautés et flèche à droite. */
.carte-section {
  position: relative; display: flex; align-items: center; gap: 22px;
  padding: 16px 22px 16px 16px; border-radius: 20px; overflow: hidden; text-decoration: none; color: #fff;
  isolation: isolate; background: var(--encre); transition: transform .25s, box-shadow .25s;
}
.carte-section:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20, 30, 38, .2); }
.carte-section-icone {
  flex: none; width: 84px; height: 84px; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25), 0 0 0 3px rgba(255, 255, 255, .2);
}
.carte-section-icone img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s ease; }
.carte-section:hover .carte-section-icone img { transform: scale(1.08); }
.carte-section.teinte-1 { background: var(--arcachon); }
.carte-section.teinte-2 { background: var(--montreal); }
.carte-section.teinte-3 { background: var(--paris); }
.carte-section::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 100% 0, rgba(255, 255, 255, .12), transparent 55%); }
.carte-section-texte { order: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.carte-section-texte strong { font: 500 30px/1.1 var(--serif); }
.carte-section-texte span { font-size: 14px; opacity: .85; }
.carte-section-compte { font-size: 11px !important; letter-spacing: .18em; text-transform: uppercase; opacity: .7 !important; }
.carte-section-neuf {
  order: 2; flex: none; padding: 6px 11px; border-radius: 999px; white-space: nowrap;
  background: var(--or); color: #fff; font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
}
.carte-section-fleche {
  order: 3; flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .5); transition: background .2s, color .2s;
}
.carte-section:hover .carte-section-fleche { background: #fff; color: var(--encre); }
@media (max-width: 560px) {
  .carte-section { gap: 14px; padding: 12px 14px 12px 12px; }
  .carte-section-icone { width: 64px; height: 64px; border-radius: 18px; }
  .carte-section-texte strong { font-size: 23px; }
  .carte-section-texte span:not(.carte-section-compte) { display: none; }
  .carte-section-fleche { display: none; }
}

/* ---------- Cartes de contenus ---------- */

.grille-contenus { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 20px; }
.carte-contenu { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.carte-contenu-image {
  position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--papier-2), #dccfb9); display: grid; place-items: center;
}
.type-application .carte-contenu-image { background: linear-gradient(135deg, #24394a, #3e5c6f); color: #f0dfc2; }
.type-lien .carte-contenu-image { background: linear-gradient(135deg, #e7dccb, #cdbb9f); }
.type-video .carte-contenu-image { background: linear-gradient(135deg, #3b2a2a, #6b3d34); color: #fff; }
.carte-contenu-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s ease; }
.carte-contenu:hover .carte-contenu-image img { transform: scale(1.05); }
.carte-contenu-icone { font: 400 54px/1 var(--serif); opacity: .75; }
.lecture {
  position: absolute; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .9); color: var(--encre); font-size: 18px; padding-left: 4px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .25); transition: transform .2s;
}
.carte-contenu:hover .lecture { transform: scale(1.08); }
.carte-contenu-texte { display: flex; flex-direction: column; gap: 4px; }
.carte-contenu-type { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--or); }
.carte-contenu-texte strong { font: 500 24px/1.15 var(--serif); }
.carte-contenu-desc { font-size: 14px; color: var(--encre-douce); }

/* ---------- Galerie d'album ---------- */

.galerie { columns: 3 280px; column-gap: 14px; }
.galerie figure { margin: 0 0 14px; break-inside: avoid; }
.galerie a { display: block; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--papier-2); }
.galerie img { width: 100%; height: auto; transition: transform .8s ease, opacity .3s; }
.galerie a:hover img { transform: scale(1.03); }
.galerie figcaption { font-size: 13px; color: var(--discret); padding: 6px 2px 0; }

/* ---------- Vidéo ---------- */

.lecteur { margin-top: 10px; border-radius: 18px; overflow: hidden; background: #0d1317; aspect-ratio: 16 / 9; }
.lecteur video, .lecteur iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.lecteur .vide { color: rgba(255, 255, 255, .7); padding-top: 22%; }

/* ---------- Formulaires ---------- */

.formulaire { display: flex; flex-direction: column; gap: 16px; }
.formulaire label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--encre-douce); }
.formulaire label small { font-weight: 400; color: var(--discret); }
.formulaire input, .formulaire select, .formulaire textarea {
  font: 400 16px/1.4 var(--sans); color: var(--encre); padding: 13px 15px; border-radius: 10px;
  border: 1px solid rgba(28, 42, 51, .22); background: #fff; width: 100%;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(167, 131, 78, .18); }
.formulaire .bouton { align-self: flex-start; margin-top: 6px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panneau { background: var(--carte); padding: 30px; border-radius: 18px; box-shadow: 0 1px 0 var(--filet); }
.panneau h2 { font-size: 28px; margin-bottom: 4px; }
.colonnes-compte { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }

/* ---------- Pages d'accès (connexion, invitation) ---------- */

body.acces {
  min-height: 100vh; display: grid; place-items: center; padding: 90px 16px 40px;
  background:
    linear-gradient(rgba(20, 30, 38, .55), rgba(20, 30, 38, .7)),
    url("https://images.unsplash.com/photo-1749040457273-807a75fee9cc?auto=format&fit=crop&w=2000&q=70") center / cover fixed,
    var(--encre);
}
.acces-retour {
  position: fixed; top: 20px; left: var(--gouttiere); display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none; font: 500 20px/1 var(--serif);
}
.acces-retour .monogramme-d { width: 34px; height: 34px; font-size: 19px; }
.acces-carte {
  width: 100%; max-width: 480px; background: var(--carte); border-radius: 22px;
  padding: clamp(28px, 6vw, 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.acces-carte h1 { font-size: clamp(34px, 6vw, 44px); font-weight: 400; margin-bottom: 14px; }
.acces-carte h1 em { color: var(--or); }
.acces-intro { color: var(--encre-douce); font-size: 15px; margin: 0 0 26px; }
.acces-liens { margin: 22px 0 0; font-size: 14px; }
.acces-liens a { color: var(--encre-douce); }
.acces-note { margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--filet); font-size: 13px; color: var(--discret); }
.acces-carte .bouton { width: 100%; align-self: stretch; }

@media (max-width: 640px) {
  .nav-famille > a { display: none; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .page { padding-top: 100px; }
}

/* ---------- Nouveautés ---------- */

.badge-nouveau {
  display: inline-block; font: 600 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 999px; background: var(--or); color: #fff; vertical-align: middle; white-space: nowrap;
}
.compteur-neuf {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px;
  border-radius: 999px; background: var(--or); color: #fff; font: 600 11px/1 var(--sans);
}
.annonces { display: grid; gap: 14px; margin: 0 0 clamp(30px, 5vw, 50px); }
.annonce {
  position: relative; background: var(--carte); border-radius: 18px; padding: 24px 28px 22px 32px;
  box-shadow: 0 1px 0 var(--filet); overflow: hidden;
}
.annonce::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--arcachon); }
.annonce-epinglee::before { background: var(--or); }
.annonce-meta { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.annonce h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 8px; }
.annonce p:last-child { margin: 0; color: var(--encre-douce); max-width: 760px; }

.fil-nouveautes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.nouveaute {
  display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 16px; background: var(--carte);
  text-decoration: none; transition: transform .2s, box-shadow .2s; height: 100%;
}
.nouveaute:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(28, 42, 51, .08); }
.nouveaute-vignette { flex: none; width: 78px; height: 78px; border-radius: 12px; overflow: hidden; background: var(--papier-2); display: grid; place-items: center; }
.nouveaute-vignette img { width: 100%; height: 100%; object-fit: cover; }
.nouveaute-vignette.sans-image { background: linear-gradient(135deg, #3b2a2a, #6b3d34); color: #fff; font-size: 22px; }
.nouveaute-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.nouveaute-texte strong { font: 500 20px/1.2 var(--serif); }
.nouveaute-extrait { font-size: 14px; color: var(--encre-douce); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nouveaute-meta { font-size: 12px; color: var(--discret); }

/* ---------- Mur d'une section ---------- */

.discret { color: var(--discret); }
.petit { font-size: 13px; margin: 0; }
.titre-bloc em { color: var(--or); }
.mur { margin-top: clamp(50px, 7vw, 90px); }
.mur-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.mur-entete .titre-bloc { margin-bottom: 4px; }
.mur-entete p { margin: 0; }
.mur-outils { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mur-outils .bouton { padding: 10px 18px; font-size: 14px; }
.bouton-discret { border-color: transparent; color: var(--encre-douce); }
.bouton-discret:hover { border-color: var(--filet); }
.bouton-danger { border-color: #8c3b2e; color: #8c3b2e; }
.bouton-danger:hover { background: #8c3b2e; color: #fff; }
.lien { background: none; border: 0; padding: 0; color: var(--encre-douce); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.lien.danger { color: #8c3b2e; }

/* Albums repliables */
.mur-album { background: var(--carte); border-radius: 18px; margin-bottom: 14px; box-shadow: 0 1px 0 var(--filet); }
.mur-album > summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; border-radius: 18px; }
.mur-album > summary::-webkit-details-marker { display: none; }
.mur-album > summary:hover { background: rgba(28, 42, 51, .03); }
.mur-album-titre { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mur-album-titre strong { font: 500 24px/1.15 var(--serif); }
.mur-album-titre .discret { font-size: 13px; }
.chevron { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--filet); display: grid; place-items: center; flex: none; transition: transform .25s; }
.chevron::before { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--encre-douce); border-bottom: 1.5px solid var(--encre-douce); transform: translateY(-2px) rotate(45deg); }
.mur-album[open] .chevron { transform: rotate(180deg); }
.mur-album-description { margin: -6px 20px 12px; color: var(--encre-douce); font-size: 15px; }
.mur-album-vide { margin: 0; padding: 0 20px 18px; font-size: 14px; }

/* Tuiles */
.tuiles-mur { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; padding: 0 20px 20px; }
.tuile-mur { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--papier-2); }
.tuile-mur-ouvrir { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; position: relative; }
.tuile-mur-ouvrir img, .tuile-mur-ouvrir video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; pointer-events: none; }
.tuile-mur:hover .tuile-mur-ouvrir img, .tuile-mur:hover .tuile-mur-ouvrir video { transform: scale(1.05); }
.tuile-mur-fond { position: absolute; inset: 0; background: linear-gradient(135deg, #3b2a2a, #6b3d34); }
.tuile-mur .lecture { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; font-size: 15px; }
.tuile-mur-legende {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 10px 8px; text-align: left;
  background: linear-gradient(transparent, rgba(10, 16, 20, .7)); color: #fff; font-size: 12px; line-height: 1.3;
}
.tuile-mur .badge-nouveau { position: absolute; top: 8px; left: 8px; pointer-events: none; }
.tuile-mur-case { position: absolute; top: 8px; right: 8px; display: none; cursor: pointer; }
.tuile-mur-case input { position: absolute; opacity: 0; }
.tuile-mur-case span { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.tuile-mur-case input:checked + span { background: var(--or); }
.tuile-mur-case input:checked + span::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #fff; font-size: 14px; font-weight: 700; }
.en-selection .tuile-mur-case { display: block; }
.en-selection .tuile-mur-ouvrir { cursor: pointer; }
.tuile-mur.choisie { outline: 3px solid var(--or); outline-offset: 2px; }

.barre-selection {
  position: sticky; bottom: 14px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-top: 10px; border-radius: 16px; background: var(--encre); color: var(--papier);
  box-shadow: 0 14px 40px rgba(10, 16, 20, .3);
}
.barre-selection[hidden] { display: none; }
.barre-selection select, .barre-selection input { font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 10px; border: 0; }
.barre-selection input[hidden] { display: none; }
.barre-selection .bouton { padding: 9px 16px; font-size: 14px; }
.barre-selection .bouton-plein { background: var(--papier); color: var(--encre); border-color: var(--papier); }
.barre-selection .bouton-danger { border-color: #e9b5a9; color: #f3cfc6; }
.barre-selection .lien { color: rgba(245, 240, 232, .75); margin-left: auto; }

/* Fenêtres (ajout, album, média) */
dialog.fenetre {
  border: 0; padding: 0; border-radius: 20px; background: var(--carte); color: var(--encre);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
}
dialog.fenetre::backdrop { background: rgba(14, 22, 28, .6); backdrop-filter: blur(3px); }
dialog.fenetre > form { padding: 22px 24px 24px; }
dialog.fenetre header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog.fenetre header h2 { font-size: 30px; }
.fenetre-fermer { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--papier); cursor: pointer; font-size: 22px; line-height: 1; flex: none; }
.fenetre-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 4px; }
.fenetre-actions.espace { justify-content: space-between; }
.fenetre-actions span { display: flex; align-items: center; gap: 16px; }
.fenetre-actions .bouton { margin: 0 !important; align-self: auto !important; }
.mur-formulaire input[type=file] { padding: 10px; background: var(--papier); border-style: dashed; }
.mur-onglets { display: flex; gap: 8px; flex-wrap: wrap; }
.mur-onglet { flex-direction: row !important; cursor: pointer; }
.mur-onglet input { position: absolute; opacity: 0; pointer-events: none; width: auto !important; }
.mur-onglet span { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--papier); font-size: 14px; color: var(--encre-douce); transition: background .2s, color .2s; }
.mur-onglet input:checked + span { background: var(--encre); color: var(--papier); }
.mur-onglet input:focus-visible + span { outline: 2px solid var(--or); outline-offset: 2px; }
.mur-champ { display: flex; flex-direction: column; gap: 4px; }
.mur-champ[hidden], .formulaire input[hidden] { display: none; }
.mur-champ small { font-size: 12px; color: var(--discret); }

dialog.fenetre-media { width: min(1100px, calc(100vw - 24px)); background: #0d1317; color: #fff; overflow: visible; }
.fenetre-media .fenetre-fermer { position: absolute; top: -14px; right: -14px; z-index: 2; background: #fff; color: var(--encre); box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.media-zone { display: grid; place-items: center; background: #000; border-radius: 20px 20px 0 0; overflow: hidden; min-height: 200px; }
.media-zone img { max-width: 100%; max-height: calc(100vh - 260px); object-fit: contain; }
.media-zone video, .media-zone iframe { width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 260px); border: 0; display: block; }
.media-nav {
  position: absolute; top: 40%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; cursor: pointer;
}
.media-nav:hover { background: rgba(255, 255, 255, .28); }
.media-nav.precedent { left: 12px; }
.media-nav.suivant { right: 12px; }
.media-infos { padding: 14px 20px 18px; }
.media-meta { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .7); }
.media-meta strong { color: #fff; font-weight: 500; }
.media-commentaire { margin: 6px 0 0; font-size: 16px; white-space: pre-line; }
.media-commentaire:empty { display: none; }
.media-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .12); }
.media-actions label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, .75); }
.media-actions select, .media-actions input { font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 10px; border: 0; }
.media-actions .bouton { padding: 8px 16px; font-size: 14px; border-color: rgba(255, 255, 255, .5); color: #fff; }
.media-actions .bouton:hover { background: #fff; color: var(--encre); }
.media-actions .bouton-danger { border-color: #e9b5a9; color: #f3cfc6; margin-left: auto; }
.media-actions .bouton-danger:hover { background: #8c3b2e; color: #fff; }
.media-actions [hidden] { display: none; }

@media (max-width: 640px) {
  .fil-nouveautes { grid-template-columns: 1fr; }
  .tuiles-mur { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 14px; }
  .tuile-mur-legende { display: none; }
  .mur-album > summary { padding: 14px; }
  .mur-outils { width: 100%; }
  .media-nav { top: auto; bottom: -56px; }
  .annonce { padding: 20px 18px 18px 22px; }
}

/* ---------- Carnet de recettes ---------- */

.formulaire [hidden] { display: none !important; }
.bandeau-recettes { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.recettes-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.recettes-actions .bouton { margin: 0; }
.recettes-vide { text-align: center; padding: 60px 20px; background: var(--carte); border-radius: 20px; }
.recettes-vide-icone { font-size: 54px; margin: 0; }
.recettes-outils { display: flex; flex-direction: column; gap: 14px; margin-bottom: 30px; }
.recherche-recette input {
  width: 100%; max-width: 560px; font: 400 16px/1.4 var(--sans); padding: 14px 18px 14px 46px; border-radius: 999px;
  border: 1px solid rgba(28, 42, 51, .18); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%237d878c' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") no-repeat 18px center;
}
.recherche-recette input:focus { outline: none; border-color: var(--or); box-shadow: 0 0 0 3px rgba(167, 131, 78, .18); }
.filtres-themes { display: flex; gap: 8px; flex-wrap: wrap; }
.filtre-theme { border: 0; background: var(--carte); padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--encre-douce); cursor: pointer; box-shadow: 0 1px 0 var(--filet); }
.filtre-theme span { color: var(--discret); font-size: 12px; margin-left: 4px; }
.filtre-theme.actif { background: var(--encre); color: var(--papier); }
.filtre-theme.actif span { color: rgba(245, 240, 232, .65); }
.groupe-recettes { margin-bottom: 40px; }
.groupe-recettes[hidden], .carte-recette[hidden] { display: none; }
.titre-theme { font-size: 32px; margin-bottom: 16px; display: flex; align-items: center; gap: 14px; }
.titre-theme::after { content: ""; flex: 1; height: 1px; background: var(--filet); }
.grille-recettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 18px; }
.carte-recette { display: flex; flex-direction: column; background: var(--carte); border-radius: 16px; overflow: hidden; text-decoration: none; box-shadow: 0 1px 0 var(--filet); transition: transform .25s, box-shadow .25s; }
.carte-recette:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(28, 42, 51, .1); }
.carte-recette-photo { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e9dcc6, #d4bf9d); display: grid; place-items: center; overflow: hidden; }
.carte-recette-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.carte-recette:hover .carte-recette-photo img { transform: scale(1.05); }
.carte-recette-initiale { font: italic 400 64px/1 var(--serif); color: rgba(28, 42, 51, .35); }
.carte-recette-photo .badge-nouveau { position: absolute; top: 10px; left: 10px; }
.carte-recette-texte { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.carte-recette-texte strong { font: 500 23px/1.15 var(--serif); }
.carte-recette-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--encre-douce); }
.carte-recette-meta span + span::before { content: "·"; margin-right: 12px; color: var(--discret); }
.carte-recette-auteur { font-size: 12px; color: var(--discret); }

.liste-themes { display: flex; flex-direction: column; gap: 8px; max-height: 40vh; overflow: auto; }
.ligne-theme { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; }
.ligne-theme input { padding: 9px 10px !important; font-size: 14px !important; }

/* Fiche recette */
.fiche-recette { background: var(--carte); border-radius: 24px; padding: clamp(20px, 4vw, 44px); box-shadow: 0 1px 0 var(--filet); }
.fiche-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.fiche-entete h1 { font-size: clamp(38px, 5vw, 62px); font-weight: 400; }
.fiche-auteur { margin: 10px 0 0; color: var(--discret); font-size: 14px; }
.fiche-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fiche-actions .bouton { padding: 11px 20px; font-size: 14px; }
.fiche-haut { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; margin-bottom: 34px; }
.fiche-haut.sans-photo { grid-template-columns: 1fr; }
.fiche-photo { margin: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--papier-2); }
.fiche-photo a { display: block; height: 100%; cursor: zoom-in; }
.fiche-photo img { width: 100%; height: 100%; object-fit: cover; }
.fiche-infos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.fiche-infos li { background: var(--papier); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fiche-infos span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--discret); }
.fiche-infos strong { font: 500 22px/1.2 var(--serif); }
.fiche-description { margin: 22px 0 0; font: italic 400 21px/1.5 var(--serif); color: var(--encre-douce); }
.fiche-corps { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); gap: clamp(24px, 5vw, 56px); }
.fiche-corps h2 { font-size: 34px; margin-bottom: 16px; }
.portions { display: inline-flex; align-items: center; gap: 4px; background: var(--papier); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.portions button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.portions button:hover { background: var(--encre); color: #fff; }
.portions span { padding: 0 12px; font-size: 15px; }
.liste-ingredients { list-style: none; margin: 0; padding: 0; }
.liste-ingredients li { border-bottom: 1px dashed var(--filet); }
.liste-ingredients label { display: flex; gap: 12px; align-items: baseline; padding: 10px 2px; cursor: pointer; }
.liste-ingredients input { accent-color: var(--arcachon); width: 17px; height: 17px; flex: none; transform: translateY(2px); }
.liste-ingredients input:checked + span { text-decoration: line-through; color: var(--discret); }
.liste-ingredients .qte { font-weight: 600; }
.sous-titre { list-style: none; font: 500 20px/1.3 var(--serif); color: var(--or); padding: 18px 0 4px; border: 0 !important; }
.liste-etapes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.etape { background: var(--papier); border-radius: 14px; padding: 14px 18px; cursor: pointer; transition: opacity .2s; }
.etape .numero { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--or); font-weight: 600; margin-bottom: 4px; }
.etape p { margin: 0; font-size: 17px; }
.etape.faite { opacity: .45; }
.etape.faite .numero::after { content: " ✓"; }
.fiche-astuces { margin-top: 24px; border-left: 3px solid var(--or); padding: 6px 0 6px 18px; }
.fiche-astuces h3 { font-size: 24px; margin-bottom: 4px; }
.fiche-astuces p { margin: 0; color: var(--encre-douce); }
.fiche-pied { display: none; }
.fiche-retour { margin: 24px 0 0; }
.fiche-retour a { color: var(--encre-douce); }

/* Formulaire recette */
.edition-recette { gap: 18px !important; }
.edition-grille { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.edition-textes { grid-template-columns: 1fr 1.4fr; }
.edition-recette .panneau { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.edition-recette textarea { resize: vertical; line-height: 1.55 !important; }
.edition-photo { align-items: stretch; }
.apercu-photo { aspect-ratio: 4 / 3; border-radius: 14px; background: var(--papier); display: grid; place-items: center; overflow: hidden; font-size: 42px; }
.apercu-photo img { width: 100%; height: 100%; object-fit: cover; }
.edition-photo input[type=file] { padding: 10px; background: var(--papier); border-style: dashed; }
.etiquette-champ { font-size: 14px; font-weight: 500; color: var(--encre-douce); margin: 0; }
.ligne-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.champ-unite { display: flex; align-items: center; gap: 6px; }
.champ-unite input[type=number] { width: 90px !important; flex: none; }
.champ-unite em { font-style: normal; color: var(--discret); }
.ligne-choix { display: flex; gap: 24px; flex-wrap: wrap; }
.ligne-choix fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ligne-choix legend { font-size: 14px; font-weight: 500; color: var(--encre-douce); margin-bottom: 6px; width: 100%; }
.pastille-choix { flex-direction: row !important; cursor: pointer; }
.pastille-choix input { position: absolute; opacity: 0; width: auto !important; }
.pastille-choix span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--papier); font-size: 14px; font-weight: 400; color: var(--encre-douce); }
.pastille-choix input:checked + span { background: var(--encre); color: var(--papier); }
.pastille-choix input:focus-visible + span { outline: 2px solid var(--or); outline-offset: 2px; }
.barre-enregistrer-recette { position: sticky; bottom: 0; display: flex; align-items: center; gap: 18px; padding: 14px 0; background: linear-gradient(transparent, var(--fond) 35%); }
.barre-enregistrer-recette .bouton { margin: 0 !important; }
.zone-supprimer-recette { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--filet); }

@media (max-width: 860px) {
  .fiche-haut, .fiche-corps, .edition-grille, .edition-textes { grid-template-columns: 1fr; }
}

/* Impression : une fiche cuisine sobre, sans menus ni boutons */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000; font-size: 11pt; }
  .entete, .pied, .fil, .fiche-actions, .fiche-retour, .portions button, .visionneuse, .flash { display: none !important; }
  .page { padding: 0 !important; max-width: none; min-height: 0; }
  body.famille .page::before { display: none; }
  body.famille .page > .bandeau { box-shadow: none; clip-path: none; background: none; }
  .fiche-recette { box-shadow: none; padding: 0; border-radius: 0; }
  .fiche-entete { margin-bottom: 10pt; border-bottom: 1.5pt solid #000; padding-bottom: 8pt; }
  .fiche-entete h1 { font-size: 26pt; }
  .fiche-entete .surtitre { color: #555; }
  .fiche-haut { grid-template-columns: 1fr 55mm; gap: 8mm; margin-bottom: 8mm; }
  .fiche-haut .fiche-photo { order: 2; aspect-ratio: 1; border-radius: 4pt; }
  .fiche-haut.sans-photo { grid-template-columns: 1fr; }
  .fiche-infos { grid-template-columns: repeat(3, auto); gap: 4pt 10pt; justify-content: start; }
  .fiche-infos li { background: none; padding: 0; border-radius: 0; }
  .fiche-infos strong { font-size: 12pt; }
  .fiche-description { font-size: 12pt; margin-top: 8pt; }
  .fiche-corps { grid-template-columns: 62mm 1fr; gap: 9mm; }
  .fiche-corps h2 { font-size: 15pt; margin-bottom: 6pt; border-bottom: .5pt solid #999; padding-bottom: 3pt; }
  .portions { background: none; padding: 0; margin-bottom: 4pt; font-weight: 600; }
  .portions span { padding: 0; }
  .liste-ingredients li { border-bottom: 0; break-inside: avoid; }
  .liste-ingredients label { padding: 2pt 0; }
  .liste-ingredients input { -webkit-appearance: none; appearance: none; width: 9pt; height: 9pt; border: .75pt solid #000; border-radius: 1pt; }
  .liste-ingredients input:checked + span { text-decoration: none; color: #000; }
  .liste-etapes { gap: 5pt; }
  .etape { background: none; padding: 0; border-radius: 0; break-inside: avoid; opacity: 1 !important; }
  .etape p { font-size: 11pt; }
  .etape .numero { color: #000; margin-bottom: 0; }
  .etape.faite .numero::after { content: ""; }
  .sous-titre { color: #000; padding-top: 8pt; font-size: 12pt; }
  .fiche-astuces { border-left-color: #000; break-inside: avoid; }
  .fiche-pied { display: flex; justify-content: space-between; margin-top: 10mm; padding-top: 4pt; border-top: .5pt solid #999; font-size: 8.5pt; color: #555; }
}

/* ---------- Partitions de musique ---------- */

/* Mise en page : menu des thèmes à gauche (en haut sur mobile), partitions à droite. */
.partitions-disposition { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.partitions-themes { position: sticky; top: 90px; background: var(--carte); border-radius: 18px; padding: 16px 12px; box-shadow: 0 1px 0 var(--filet); }
.partitions-themes-titre { margin: 0 8px 10px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--or); font-weight: 600; }
.filtres-verticaux { flex-direction: column; gap: 2px; }
.filtres-verticaux .filtre-theme {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; box-shadow: none; border-radius: 10px; padding: 9px 10px; font-size: 15px; color: var(--encre);
}
.filtres-verticaux .filtre-theme:hover:not(:disabled) { background: var(--papier); }
.filtres-verticaux .filtre-theme.actif { background: var(--encre); color: var(--papier); }
.filtres-verticaux .filtre-theme span:last-child { font-size: 12px; min-width: 24px; text-align: center; padding: 2px 6px; border-radius: 999px; background: var(--papier); color: var(--encre-douce); margin: 0; }
.filtres-verticaux .filtre-theme.actif span:last-child { background: rgba(255, 255, 255, .16); color: var(--papier); }
.filtre-theme.vide-theme { color: var(--discret) !important; cursor: default; }
.partitions-contenu .recherche-recette { display: block; margin-bottom: 22px; }
.partitions-contenu .recherche-recette input { max-width: none; }
.partitions-contenu .groupe-recettes { margin-bottom: 30px; }
.titre-theme-partitions { font-size: 26px; margin-bottom: 12px; padding-left: 12px; border-left: 3px solid var(--or); }
.titre-theme-partitions::after { display: none; }
.compte-theme { font: 500 12px/1 var(--sans); color: var(--discret); background: var(--carte); padding: 4px 8px; border-radius: 999px; }

/* Tuiles compactes */
.grille-partitions { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px 12px; }
.carte-partition { border-radius: 12px; }
.carte-partition .carte-recette-texte { padding: 8px 10px 10px; gap: 2px; }
.carte-partition .carte-recette-texte strong { font-size: 17px; line-height: 1.2; }
.carte-partition .carte-recette-meta { font-size: 11px; gap: 2px 8px; }
.carte-partition .carte-recette-meta span + span::before { margin-right: 8px; }
.carte-partition .badge-nouveau { top: 6px; left: 6px; font-size: 9px; padding: 4px 6px; }
.carte-partition-apercu { aspect-ratio: 4 / 5; background: #f3efe8; }
.carte-partition-apercu img { object-position: top; }
.feuille-partition {
  position: absolute; inset: 14% 16%; background: #fff; border-radius: 4px; box-shadow: 0 6px 18px rgba(28, 42, 51, .14);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 13px, rgba(28, 42, 51, .28) 13px, rgba(28, 42, 51, .28) 14px,
    transparent 14px, transparent 17px);
  background-size: 76% 70px; background-position: center 34px; background-repeat: repeat-y;
  display: flex; align-items: flex-start; padding: 6px 0 0 6px; background-size: 76% 46px; background-position: center 22px;
}
.feuille-partition span { font-size: 30px; line-height: 1; color: var(--encre); font-family: "Segoe UI Symbol", "Noto Music", serif; }
.pastille-format {
  position: absolute; right: 6px; bottom: 6px; padding: 3px 6px; border-radius: 6px;
  background: #b3261e; color: #fff; font: 700 11px/1 var(--sans); letter-spacing: .06em;
}
.carte-partition-compositeur { font-size: 12px; color: var(--encre-douce); font-style: italic; }

.fiche-compositeur { margin: 6px 0 0; font: italic 400 24px/1.3 var(--serif); color: var(--encre-douce); }
.partition-notes { margin: 0 0 26px; }
.partition-pdf { margin-bottom: 26px; }
.partition-pdf-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.partition-pdf-barre > span:first-child { font-weight: 500; overflow-wrap: anywhere; }
.partition-pdf-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.partition-pdf-actions .bouton { padding: 9px 16px; font-size: 14px; }
.partition-lecteur { display: block; width: 100%; height: 85vh; min-height: 520px; border: 1px solid var(--filet); border-radius: 14px; background: #fff; }
.partition-aide-mobile { display: none; }
.partition-pages { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.partition-page { margin: 0; width: 100%; max-width: 900px; }
.partition-page a { display: block; cursor: zoom-in; }
.partition-page img { width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: 0 4px 22px rgba(28, 42, 51, .12); }
.partition-page figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--discret); padding: 8px 2px 0; }
.partition-page figcaption a { color: var(--encre-douce); cursor: pointer; }

.fichiers-partition { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fichiers-partition li { display: flex; align-items: center; gap: 12px; background: var(--papier); border-radius: 12px; padding: 8px 12px 8px 8px; }
.fichiers-partition img, .fichier-icone { width: 44px; height: 56px; object-fit: cover; border-radius: 4px; flex: none; }
.fichier-icone { display: grid; place-items: center; background: #b3261e; color: #fff; font: 700 11px/1 var(--sans); }
.fichier-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 400; color: var(--encre); }
.fichiers-partition .champ-ordre { width: 72px !important; padding: 6px 8px !important; font-size: 14px !important; }
.liste-nouveaux-fichiers { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--encre-douce); }
.liste-nouveaux-fichiers:empty { display: none; }
.liste-nouveaux-fichiers li { padding: 3px 0; }

@media (max-width: 860px) {
  .partitions-disposition { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .partitions-themes, .partitions-contenu { min-width: 0; }
  .partitions-themes { position: sticky; top: 64px; z-index: 5; padding: 8px; border-radius: 14px; }
  .partitions-themes-titre { display: none; }
  .filtres-verticaux { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .filtres-verticaux::-webkit-scrollbar { display: none; }
  .filtres-verticaux .filtre-theme { width: auto; flex: none; white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .filtre-theme.vide-theme { display: none; }
  .grille-partitions { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px 8px; }
}
@media (max-width: 560px) {
  .grille-partitions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .carte-partition .carte-recette-texte strong { font-size: 15px; }
  .carte-partition .carte-recette-meta { display: none; }
}
@media (max-width: 760px) {
  .partition-lecteur { height: 70vh; min-height: 380px; }
  .partition-aide-mobile { display: block; }
}

/* Impression d'une partition en images : une page de partition par feuille, rien d'autre. */
@media print {
  .page-partition .fiche-entete, .page-partition .partition-notes, .page-partition .partition-pdf,
  .page-partition .partition-page figcaption { display: none !important; }
  .page-partition .partition-pages { display: block; }
  .page-partition .partition-page { max-width: none; break-after: page; }
  .page-partition .partition-page:last-child { break-after: auto; }
  .page-partition .partition-page img { box-shadow: none; border-radius: 0; max-height: 265mm; width: auto; max-width: 100%; margin: 0 auto; display: block; }
}

.acces-version { position: fixed; left: 0; right: 0; bottom: 12px; margin: 0 !important; text-align: center; color: rgba(255, 255, 255, .75); }
@media print { .pied-version { display: none; } }

/* Lien « Ouvrir la vidéo sur … » sous une vidéo en ligne */
.lien-source-video { margin: 10px 0 0; font-size: 14px; }
.lien-source-video a { color: var(--encre); font-weight: 500; }
.media-source { margin: 8px 0 0; font-size: 14px; }
.media-source a { color: #fff; font-weight: 500; }
.media-source-aide { color: rgba(255, 255, 255, .6); font-size: 13px; }

/* Progression de l'envoi d'une vidéo par morceaux */
.progression-envoi p { margin: 6px 0 0; font-size: 13px; color: var(--encre-douce); }
.barre-progression { height: 8px; border-radius: 999px; background: var(--papier-2); overflow: hidden; }
.barre-progression span { display: block; height: 100%; width: 0; background: var(--arcachon); transition: width .3s; }
