/* Sorella — the gift set, delivered on the page (theme inc/coffret.php, assets/kit/coffret.js).
   Site palette: nacre ground, aubergine text, sauge for the second voice. No zip, no icon. */

.coffret{--c-aubergine:var(--aubergine,#2E1626);--c-nacre:var(--nacre,#FAF8F6);--c-sauge:var(--sauge,#9E9F91);--c-douce:var(--encre-douce,#4A3540);
  color:var(--c-aubergine);text-align:left;outline:none;}
.coffret[hidden]{display:none;}

/* Arrival: the form leaves, the gift set rises. */
.coffret-sort{opacity:0;transform:translateY(-8px);transition:opacity .45s ease,transform .45s ease;}
.coffret.coffret-entre{opacity:0;transform:translateY(14px);transition:opacity .7s ease,transform .9s cubic-bezier(.2,.7,.2,1);}
.coffret.coffret-entre.coffret-vu{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){.coffret-sort,.coffret.coffret-entre{transition:none;}}

.coffret-titre{font-family:var(--titre);font-weight:400;font-size:clamp(22px,2.6vw,30px);line-height:1.25;text-wrap:balance;max-width:24ch;}

/* One wording per device: share sheet (phone) or download (computer). */
.coffret .si-partage,.coffret .si-telechargement{display:none;}
.coffret.mode-partage .si-partage,.coffret.mode-telechargement .si-telechargement{display:inline;}
.coffret:not(.mode-partage):not(.mode-telechargement) .si-telechargement{display:inline;}

/* The six pieces: whole thumbnails, names aligned on one line. */
.coffret-liste{list-style:none;margin:clamp(22px,3vw,32px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(18px,2.4vw,28px) clamp(12px,2vw,22px);}
.coffret-piece{display:flex;flex-direction:column;min-width:0;}
/* A 9:16 frame drawn with padding (not aspect-ratio): iPhone Safari miscounted the height
   of the grid with aspect-ratio while the thumbnails loaded, and the next section rose over the end of the gift set. */
.coffret-piece figure{margin:0;position:relative;height:0;padding-top:177.78%;overflow:hidden;}
.coffret-piece img{position:absolute;left:0;bottom:0;width:100%;height:auto;display:block;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
.coffret-nom{margin-top:10px;font-size:15px;line-height:1.35;}
.coffret-type{font-style:italic;font-size:14px;line-height:1.35;color:var(--c-sauge);margin-bottom:10px;}
/* The buttons of a row on one line, even when a name takes 2 lines (« L'écran se referme »). */
.coffret-piece .coffret-bouton{margin-top:auto;}

.coffret-bouton,.coffret-tout{font-family:var(--titre);font-size:10.5px;letter-spacing:2.4px;text-transform:uppercase;cursor:pointer;
  border:1px solid var(--c-aubergine);border-radius:0;background:transparent;color:var(--c-aubergine);
  min-height:44px;padding:12px 10px;margin-top:10px;width:100%;transition:background .3s ease,color .3s ease,opacity .3s ease;-webkit-tap-highlight-color:transparent;}
.coffret-bouton:hover,.coffret-bouton:focus-visible{background:var(--c-aubergine);color:var(--c-nacre);}
.coffret-bouton:focus-visible,.coffret-tout:focus-visible{outline:1px solid var(--c-aubergine);outline-offset:3px;}
.coffret-bouton.est-fait{border-color:var(--c-sauge);color:var(--c-douce);}
.coffret-bouton.est-fait:hover{background:transparent;color:var(--c-douce);}
.coffret .attend{opacity:.55;pointer-events:none;}

.coffret-fin{margin-top:clamp(24px,3vw,32px);display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:clamp(10px,2vw,22px);align-items:end;}
.coffret-fin .coffret-bouton,.coffret-fin .coffret-tout{margin-top:0;}
.coffret-tout{background:var(--c-aubergine);color:var(--c-nacre);}
.coffret-tout:hover{opacity:.88;}
.coffret-tout.est-fait{background:transparent;color:var(--c-douce);border-color:var(--c-sauge);}

.coffret-etat{margin-top:12px;font-style:italic;font-size:15px;color:var(--c-douce);}
.coffret-etat:empty{display:none;}

/* Help line, end of the day, link to the library. */
.coffret-aide{margin-top:16px;font-size:13.5px;line-height:1.5;color:var(--c-douce);max-width:52ch;}
.coffret-licence{margin-top:8px;font-size:13.5px;line-height:1.5;color:var(--c-douce);}
.coffret-licence + .coffret-suite{margin-top:14px;}
.coffret-mesure{font-size:12.5px;color:var(--c-douce);}
.coffret-suite{margin-top:clamp(26px,3vw,36px);padding-top:clamp(20px,2.4vw,26px);border-top:1px solid rgba(46,22,38,.22);font-size:17px;line-height:1.6;}
.coffret-lien{margin-top:12px;}
.coffret-lien a{font-family:var(--titre);font-size:10.5px;letter-spacing:2.4px;text-transform:uppercase;text-decoration:none;color:var(--c-aubergine);border-bottom:1px solid rgba(46,22,38,.30);padding-bottom:4px;}
.coffret-lien a:hover{border-bottom-color:var(--c-aubergine);}
html.soir .recevoir-coffret .coffret-suite{border-top-color:rgba(250,248,246,.16);}
html.soir .recevoir-coffret .coffret-lien a{border-bottom-color:rgba(250,248,246,.45);}

@media (max-width:520px){
  .coffret-liste{gap:18px 10px;}
  .coffret-nom{font-size:14px;}
  .coffret-type{font-size:13px;}
  .coffret-bouton,.coffret-tout{letter-spacing:1.6px;padding:12px 6px;}
  /* « Télécharger » (Android, computer) is longer than « Enregistrer »: it must fit a third of a phone. */
  .coffret.mode-telechargement .coffret-piece .coffret-bouton{letter-spacing:.6px;padding:12px 2px;font-size:10px;}
  .coffret-fin{grid-template-columns:1fr;}
}

/* Very small phones (320 px): a little more room in the card for « Télécharger ». */
@media (max-width:359px){
  .carton-coffret{padding-left:14px;padding-right:14px;}
  .coffret-liste{gap:18px 8px;}
  .coffret.mode-telechargement .coffret-piece .coffret-bouton{font-size:9.5px;letter-spacing:.3px;}
}

/* In the invitation window: the gift set takes the place of the form. */
.invite-boite .coffret{padding:clamp(30px,4vw,48px) clamp(24px,4vw,44px) 28px;}
/* On the /24h/ page: the card keeps its champagne ground. */
.carton-coffret{max-width:720px;margin:0 auto;padding:clamp(34px,6vw,80px) clamp(24px,6vw,80px);background:var(--nacre,#FAF8F6);}

/* Thank-you page of the email: the gift set sits on the page itself, then ends
   before the sharing section (its own ground, a line between them in the evening). */
.recevoir-coffret{position:relative;display:flow-root;padding:0 var(--m,clamp(22px,6.5vw,132px)) clamp(64px,9vw,110px);}
.recevoir-coffret + .soeur{position:relative;}
html.soir .recevoir-coffret + .soeur{background:#3A2131;border-top:1px solid rgba(250,248,246,.16);}
.recevoir-coffret .coffret{max-width:980px;}
@media (min-width:900px){.recevoir-coffret .coffret-liste{grid-template-columns:repeat(6,minmax(0,1fr));}}
/* Evening: the kit pages turn aubergine, the gift set follows. */
html.soir .recevoir-coffret .coffret{--c-aubergine:var(--nacre,#FAF8F6);--c-nacre:var(--aubergine,#2E1626);--c-douce:rgba(250,248,246,.78);}
html.soir .recevoir-coffret .coffret-fin{border-top-color:rgba(250,248,246,.16);}
