/* these.css -- LaMinuteCocotte.com, V368 (7 novembre 2026, conversation 67)
   LA THESE DE MICHEL BERTINO, page Astrophysique. Elle remplace la capture de la notice WorldCat, qui reste
   au bout d'un lien du cartel (choix d'Anne).
   LE FOND : une carte du ciel crème et sépia, étoiles or mordoré (photos/these/ciel.svg ; choix d'Anne, « C2 »).
   La Grande Ourse et Cassiopée y sont les vraies. Ce n'est PAS la table de la famille : photographiée, elle
   gâchait la thèse (Anne : « le principe, c'est la thèse et pas la table ») ; le livre est détouré.
   LE LIVRE : chaque double page est UNE photo d'Anne, détourée, redressée, la lumière de la fenêtre adoucie,
   le papier ramené à un même ivoire. Rien de ce qui est sur le papier n'a bougé (la transparence du verso reste).
   Tous les rectangles sont calés sur le même cadre (3320 x 2310 dans la photo maîtresse, le dos au milieu) :
   c'est ce qui permet aux pages de tourner les unes sur les autres. */
html, body { margin:0; min-height:100%; }
/* LE FOND : la TOILE du carnet, brute, sans rien d'autre (choix d'Anne, 7 nov., 15 h 23 : « au plus c'est sobre, au
   mieux ça sert l'objet »). La carte du ciel (« C2 », retirée du site ; sa fabrication : ciel_svg.py, dans le contexte) a servi tant que le livre était détouré ;
   avec la bande de table, elle faisait un fond sur un fond. Écartés aussi : une page cousue sur le fond à points (un
   cadre de plus), quelques étoiles dans la marge (« brouillerait l'aspect brut de l'objet »). */
html { background:#EDE3CC url('../images/cover-texture.webp') repeat; }
body { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:100vh;
  min-height:100svh; padding:14px; box-sizing:border-box; color:#3A2E24; }
.these { position:relative; display:flex; flex-direction:column; align-items:center; }

/* la scène : la largeur que permet l'écran, en gardant la place des commandes et du cartel.
   V368, choix d'Anne (7 nov., 14 h 30) : chaque double page est LA PHOTO ENTIÈRE, avec une bande de la vraie table
   autour (le chêne de la famille), et l'on passe de l'une à l'autre par un FONDU. Le détourage des pages, puis la
   feuille qui tournait, ont été essayés et écartés : le détourage faisait « cheap », et une page coupée droite pour
   pouvoir tourner perdait le bombé du papier (« si l'œil voit que l'objet est tronqué, c'est raté »). Que la table
   bouge un peu d'une photo à l'autre, c'est voulu : « c'est ça qui donnera le mouvement ». Sa COULEUR, elle, est
   ramenée sur toutes les photos à celle du bois de la page 27. */
.livre { position:relative; aspect-ratio:3600 / 2590; width:min(96vw, calc((100vh - 96px) * 1.39), 1900px);
  width:min(96vw, calc((100svh - 96px) * 1.39), 1900px); min-width:280px; user-select:none; -webkit-user-select:none; }
.livre .vue { position:absolute; inset:0; width:100%; height:100%; display:block; border-radius:14px; opacity:0;
  box-shadow:0 10px 24px rgba(58,46,36,.30); transition:opacity var(--fondu, 1.1s) ease; }
.livre .vue.visible { opacity:1; z-index:1; }
/* la vue cachee ne doit pas prendre le toucher destine a la photo visible */
.livre .vue:not(.visible) { pointer-events:none; }
.livre.ouvert .vue { cursor:zoom-in; }

/* L'OUVERTURE : on arrive sur la tranche, posée de face, le nom en lettres dorées. Un toucher l'ouvre. */
.tranche { position:absolute; left:50%; top:50%; width:88%; transform:translate(-50%,-50%); cursor:pointer;
  transition:opacity .9s ease, transform 1.1s cubic-bezier(.4,.1,.3,1); z-index:4; border:none; background:none; padding:0; }
.tranche img { display:block; width:100%; border-radius:12px; box-shadow:0 10px 24px rgba(58,46,36,.30); }
/* V371 (8 nov. 2026, Anne : « partir de la vraie photo serait quand même plus intelligent ») : la tranche n'est plus
   detouree, c'est la photo d'Anne recadree avec une bande de la table, coins arrondis comme les doubles pages
   (89-photo.webp, outil contexte/outils-albums/v371/tranche_photo.py). Le detourage laissait des bords a rattraper.
   Avant la these ouverte, TOUTE la scene ouvre la these : la consigne aussi (Anne). */
.livre:not(.ouvert) { cursor:pointer; }
/* L'INVITATION (V369, Anne, 7 nov., 20 h 46) : la consigne, AU-DESSUS de la couverture, qui flotte doucement. Essayés et
   écartés le même soir : un éclat qui parcourait la tranche (« fait vraiment factice »), la tranche qui se soulevait
   toutes les 5 s (« pas très clair »), puis une flèche (brune, puis un ruban clair cousu, qui descendait toucher la
   couverture) : « la flèche, c'était pour remplacer l'instruction ; si on donne le mode d'emploi, plus besoin de
   flèche ». La consigne était sous le livre ; elle passe au-dessus. */
.livre.ouvert .tranche { opacity:0; transform:translate(-50%,-50%) perspective(2000px) scale(.82) rotateX(60deg); pointer-events:none; }
/* LE PASSAGE DE LA TRANCHE AU LIVRE (Anne, 7 nov. : « pourrait etre plus fluide ») : la tranche bascule et
   s'efface pendant que la couverture apparaît en fondu, à sa place. */

.scene { display:flex; flex-direction:column; align-items:center; }
/* LE SEUIL (V369) : l'invitation et le ruban occupent la meme place, l'une avant l'ouverture, l'autre apres --
   la place reste, sinon le livre sautait vers le haut a l'ouverture. */
.seuil { display:grid; width:100%; margin-top:8px; }
.seuil > * { grid-area:1 / 1; }
.invite { position:absolute; left:0; right:0; top:24%; margin:0; font:600 26px/1.1 'Caveat', cursive; color:#8a7550; text-align:center;
  transition:opacity .5s ease; pointer-events:none; z-index:5; cursor:pointer; animation:these-flotte 3.2s ease-in-out infinite; }
@keyframes these-flotte { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
.these.ouverte .invite { opacity:0; pointer-events:none; }

/* LE RUBAN MARQUE-PAGE (V369, Anne : « ça demande 200 clics ») : un ruban de la couleur du dos de cuir, tendu sous
   le livre ; un petit signet de laiton marque la page. On le tire pour aller où l'on veut ; au bout, la quatrieme de
   couverture. C'est un vrai curseur : il se prend au doigt, a la souris et au clavier. */
.ruban { position:relative; z-index:7; display:flex; align-items:center; gap:10px; width:100%; opacity:0; pointer-events:none; transition:opacity .6s ease .4s; }
.these.ouverte .ruban { opacity:1; pointer-events:auto; }
.ruban .bout-g, .ruban .bout-d { font:600 17px/1 'Caveat', cursive; color:#8a7550; white-space:nowrap; flex:none; }
.ruban input { flex:1; -webkit-appearance:none; appearance:none; height:30px; margin:0; background:transparent; cursor:pointer; --fait:0%; }
.ruban input:focus { outline:none; }
.ruban input:focus-visible { outline:2px dashed #9C8358; outline-offset:2px; border-radius:4px; }
.ruban input::-webkit-slider-runnable-track { height:6px; border-radius:1px;
  background:linear-gradient(90deg, #4b5a3f var(--fait), #7f8d6e var(--fait)); box-shadow:0 1px 2px rgba(58,46,36,.3); }
.ruban input::-moz-range-track { height:6px; border-radius:1px; background:#7f8d6e; box-shadow:0 1px 2px rgba(58,46,36,.3); }
.ruban input::-moz-range-progress { height:6px; background:#4b5a3f; }
.ruban input::-webkit-slider-thumb { -webkit-appearance:none; width:14px; height:26px; margin-top:-10px; border:1px solid #8a6a3a; border-radius:2px 2px 6px 6px;
  background:linear-gradient(90deg, #8f6c34, #f3dfa6 45%, #c9a35c 70%, #8f6c34); box-shadow:0 2px 4px rgba(58,46,36,.35); }
.ruban input::-moz-range-thumb { width:14px; height:26px; border:1px solid #8a6a3a; border-radius:2px 2px 6px 6px;
  background:linear-gradient(90deg, #8f6c34, #f3dfa6 45%, #c9a35c 70%, #8f6c34); box-shadow:0 2px 4px rgba(58,46,36,.35); }
/* l'etiquette qui dit ou l'on est, pendant qu'on tire */
.ruban-etiquette { position:absolute; bottom:calc(100% + 2px); transform:translateX(-50%); margin-left:0; white-space:nowrap;
  font:600 18px/1 'Caveat', cursive; color:#4a3620; background:#f1dfae; padding:3px 9px 4px; border-radius:2px;
  box-shadow:0 2px 5px rgba(58,46,36,.25); opacity:0; transition:opacity .2s ease; pointer-events:none; }
.ruban-etiquette.vue { opacity:1; }


/* LES COMMANDES : deux bandes au bord du livre, comme dans le carnet de bêtises, et une seule pastille de
   laiton dessous -- la pause, que l'on doit voir (Anne : « qu'on comprenne bien qu'à tout moment on peut
   mettre en pause »). Pas de numéros de page : on feuillette. */
.tourne { position:absolute; top:0; height:100%; width:min(9vw, 90px); border:none; background:none; padding:0;
  cursor:pointer; z-index:6; -webkit-appearance:none; appearance:none; display:none; }
.these.ouverte .tourne { display:block; }
.tourne--avant { right:calc(-1 * min(9vw, 90px)); } .tourne--arriere { left:calc(-1 * min(9vw, 90px)); }
.tourne .chevron { position:absolute; top:50%; width:20px; height:20px; border-top:3px solid rgba(139,111,71,.85);
  border-right:3px solid rgba(139,111,71,.85); opacity:.7; transition:opacity .3s ease, transform .3s ease; pointer-events:none; }
.tourne--avant .chevron { left:30%; transform:translateY(-50%) rotate(45deg); }
.tourne--arriere .chevron { right:30%; transform:translateY(-50%) rotate(-135deg); }
/* V405 (14 nov. 2026, le site a l'oreille) : LE BOUTON DU CLAVIER POUR LA GRANDE VUE. Pose sur tout le livre, la souris
   le traverse (elle clique la page elle-meme) ; il ne se dessine qu'au clavier, d'un pointille d'encre. */
.agrandir { display:none; position:absolute; inset:0; z-index:3; pointer-events:none; border:none; background:none; padding:0;
  border-radius:6px; }
.these.ouverte .agrandir { display:block; }
.agrandir:focus { outline:none; }
.agrandir:focus-visible { outline:2.5px dashed #F3E9CF; outline-offset:-10px; box-shadow:inset 0 0 0 12px rgba(58,46,36,.25); }
.tourne.inerte { cursor:default; } .tourne.inerte .chevron { opacity:.15; }
@media (hover:hover) { .tourne:not(.inerte):hover .chevron { opacity:1; } }
.commandes { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:18px; width:100%; margin-top:4px; height:46px; }
.these:not(.ouverte) .commandes { visibility:hidden; }
.laiton { width:46px; height:46px; border-radius:50%; border:1px solid #8a6a3a; cursor:pointer; padding:0;
  background:radial-gradient(circle at 35% 30%, #f3dfa6, #c9a35c 55%, #8f6c34); box-shadow:0 3px 8px rgba(58,46,36,.3), inset 0 1px 1px rgba(255,255,255,.6);
  display:flex; align-items:center; justify-content:center; -webkit-appearance:none; appearance:none; }
.laiton:active { transform:translateY(1px); }
.laiton svg { width:18px; height:18px; fill:#4a3620; }
.laiton .lecture, .laiton .refeuilleter { display:none; } .laiton.arret .lecture { display:block; } .laiton.arret .pause { display:none; }
.laiton.bout .lecture { display:none; } .laiton.bout .refeuilleter { display:block; }
/* la bulle de la pastille au-dessus d elle (V369) : posee dessous, elle depassait du bas de l ecran et faisait naitre une barre de defilement */

/* un toucher sur une page l'ouvre en grand, sur la toile : LA MÊME VISIONNEUSE QUE CELLE DES ALBUMS (V369, 8 nov. 2026 ;
   règles recopiées de la page d'un album, ex. albums/annee-2018/index.htm, pour que les deux se ressemblent : croix en
   haut à droite, flèches sur les côtés, légende et loupe en bas). Les classes vivent sur .grande (vue, loupe, solo) et
   non sur le corps de la page, où .these.ouverte a déjà un autre sens. */
.grande { position:fixed; inset:0; z-index:9998; display:none; background:#EDE3CC url('../images/cover-texture.webp') repeat; }
.grande.vue { display:block; }
.grande .cadre { position:absolute; inset:0; overflow:auto; display:flex; align-items:center; justify-content:center; padding:16px 16px 92px; }
.grande img { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100dvh - 108px); cursor:zoom-in;
  box-shadow:0 10px 30px rgba(58,46,36,0.24); }
.grande.loupe .cadre { display:block; }
.grande.loupe img { max-width:none; max-height:none; margin:0 auto; cursor:zoom-out; }
.grande .legende { position:fixed; left:16px; right:16px; bottom:16px; margin:0 auto; width:fit-content; max-width:calc(100vw - 32px);
  display:flex; align-items:center; gap:12px; z-index:2; background:#FFFDF8; border:1px solid #d8c9ae; border-radius:18px;
  padding:7px 8px 7px 16px; box-shadow:0 6px 16px rgba(58,46,36,0.2); }
.grande .legende .quoi { font-family:'Caveat', cursive; font-size:21px; font-weight:600; line-height:1.1; text-wrap:balance; min-width:0; }
.grande .loupe-btn { flex:none; font-family:'Caveat', cursive; font-size:18px; font-weight:600; color:#FAF3E7; background:#8B6F47;
  border:none; border-radius:14px; padding:5px 14px 6px; cursor:pointer; }
.grande .loupe-btn:hover { background:#755C3A; }
.grande .fermer { position:fixed; top:14px; right:14px; z-index:3; width:40px; height:40px; border-radius:50%;
  background:#8B6F47; color:#FAF3E7; border:none; cursor:pointer; font-size:22px; line-height:1; }
.grande .fermer:hover { background:#755C3A; }
.grande .feuilleter { position:fixed; top:50%; transform:translateY(-50%); z-index:3; width:44px; height:78px; border:none; cursor:pointer;
  background:rgba(139,111,71,0.14); color:#6b553a; font-size:26px; line-height:1; border-radius:8px; }
.grande .feuilleter:hover { background:rgba(139,111,71,0.3); color:#FAF3E7; }
.grande .feuilleter:disabled { opacity:.25; cursor:default; }
.grande .prec { left:8px; } .grande .suiv { right:8px; }
.grande .suiv::after { left:auto; right:0; transform:none; }
.grande .prec::after { left:0; transform:none; }
.grande .fermer::after { bottom:auto; top:calc(100% + 8px); left:auto; right:0; transform:none; }
.grande .fermer::before { bottom:auto; top:calc(100% + 3px); border-top-color:transparent; border-bottom-color:#8B6F47; }
.grande.loupe .feuilleter, .grande.solo .feuilleter { display:none; }
body.grand-ouvert { overflow:hidden; }

/* le lien du cartel vers la notice de bibliothèque */
.cartel-carnet a { color:inherit; text-decoration:none; border-bottom:1.5px dotted currentColor; cursor:pointer; }
.these-pied { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; width:100%; margin-top:8px; }

@media (prefers-reduced-motion:reduce) {
  .livre .vue { transition:none; }
  .invite { animation:none; }
}
@media (max-width:599px), (max-height:519px) {
  .livre { width:min(78vw, calc((100svh - 190px) * 1.39)); }
}
/* le cartel se pose sous le livre, à gauche, la signature à droite (cartel.js le laisse à sa place : `fixe`) */
.these-pied .cartel-carnet.fixe:not(.sous) { position:relative; left:auto; bottom:auto; transform:rotate(-1.5deg); transform-origin:left top; flex:none; }
.these-pied .site-signature { transform:none; }
@media (max-width:599px), (max-height:519px) { .these-pied { flex-direction:column; align-items:center; gap:0; } }
body.grand-ouvert .home-badge { display:none; }

/* V369 (Anne, 7 nov., 17 h 24 : « le cartel, il faut impérativement le poser à côté, surtout qu'on a bien la place ») :
   A L'ORDINATEUR, la feuille du cartel et la signature passent A DROITE du livre ; le livre prend le reste de la largeur.
   Au telephone et dans les fenetres etroites, rien ne change : dessous. */
@media (min-width:1000px) and (min-height:520px) {
  body { padding:14px 24px; }
  .these { flex-direction:row; align-items:center; gap:100px; }   /* 100 : la place du chevron de droite, qui deborde du livre */
  .livre { width:min(calc(100vw - 500px), calc((100svh - 130px) * 1.39), 1700px); }
  .these-pied { flex-direction:column; justify-content:space-between; align-items:flex-start; width:auto; align-self:stretch;
    margin:0; padding:18px 0 10px; gap:30px; }
  .these-pied .cartel-carnet.fixe:not(.sous) { transform:rotate(1.5deg); transform-origin:left top; margin-top:auto; }
  .these-pied .site-signature { margin-top:auto; }
}
@media (max-width:599px) {
  .invite { font-size:21px; top:22%; }
  /* V375 (9 nov. 2026, remarque d'Anne : « l'objet principal, c'est la thèse » ; au téléphone, les deux bandes des
     chevrons, posées de part et d'autre du livre, le rétrécissaient à 304 px pour un cartel de 340) : AU TÉLÉPHONE, LES
     CHEVRONS DESCENDENT DE PART ET D'AUTRE DE LA PASTILLE DE LAITON (these.js les y déplace, les mêmes boutons) ; le livre
     reprend toute la largeur. ILS RESTENT DES CHEVRONS FINS, les mêmes qu'à l'ordinateur : essayés en pastilles de laiton,
     écartés par Anne (« trois boutons laitonnés, ça commence à faire un gros toc », la pastille de lecture doit garder
     plus d'impact que le passage d'une page à l'autre). A L'ORDINATEUR, RIEN NE BOUGE. */
  .livre { width:min(94vw, calc((100svh - 190px) * 1.39)); }
  .commandes { grid-template-columns:1fr auto 1fr; gap:10px; }
  .commandes > span { display:flex; }
  .commandes > span:first-child { justify-content:flex-end; } .commandes > span:last-child { justify-content:flex-start; }
  .commandes .tourne { position:relative; display:block; left:auto; right:auto; top:auto; width:46px; height:46px; }
  .commandes .tourne--avant .chevron { left:12px; } .commandes .tourne--arriere .chevron { right:12px; }
}
/* LA SIGNATURE (V369, Anne, 7 nov., 20 h 50) : devant la thèse fermée, sans table autour, elle « fait vraiment bizarre »
   sous le cartel, et doublait la consigne. Elle n'apparaît qu'une fois la thèse ouverte, en un fondu très lent. */
.these .site-signature { transition:opacity 2.5s ease 1.5s; }
.these:not(.ouverte) .site-signature { opacity:0; transition:none; }

/* LE CARTEL EN CIEL DE FETE (V370, choix « D » d'Anne, 8 nov. 2026) : le texte d'avant, sur un ciel vert nuit (les
   gardes de la these), une lune, une fusee et Saturne en tete ; encre creme, Caveat. Il remplace la feuille de carnet
   a l'encre bleue. Au telephone sous le livre, a l'ordinateur dans la colonne de droite, comme l'etait la feuille. */
.cartel-ciel { position:relative; box-sizing:border-box; width:min(340px, 92vw); padding:62px 22px 18px;
  background:linear-gradient(180deg, #26301f, #3a4630); border-radius:16px; color:#F3E9CF;
  box-shadow:0 10px 22px rgba(40,34,24,.35); transform:rotate(-1.2deg); flex:none; margin:6px auto 22px; }
.cartel-ciel .deco { position:absolute; left:0; top:4px; width:100%; height:auto; }
.cartel-ciel .t { position:relative; margin:0; font:600 21px/1.2 'Caveat', 'Segoe Script', cursive; text-wrap:pretty; }
.cartel-ciel a { color:inherit; text-decoration:none; border-bottom:1.5px dotted currentColor; cursor:pointer; }
@media (min-width:1000px) and (min-height:520px) {
  .these-pied .cartel-ciel { width:300px; margin:auto 0 0; transform:rotate(1.2deg); }
  .cartel-ciel .t { font-size:20px; }
}

/* V409 (Anne, 15 nov. 2026, 21 h 36) : AU TÉLÉPHONE COUCHÉ, COMME À L'ORDINATEUR : le livre prend la hauteur, le cartel
   et la signature passent à sa DROITE (on tient désormais le téléphone couché dès la fresque ; sous le livre, il fallait
   descendre pour lire). La signature garde son fondu à l'ouverture. Debout : rien ne change. */
@media (orientation:landscape) and (max-height:500px) and (pointer:coarse) and (min-width:600px) {
  body { padding:8px 16px; }
  .these { flex-direction:row; align-items:center; gap:70px; }
  /* sous le livre : le ruban marque-page et la pastille de laiton (environ 105 px) */
  .livre { width:min(calc(100vw - 380px), calc((100svh - 108px) * 1.39)); }
  .these-pied { flex-direction:column; justify-content:flex-end; align-items:flex-end; width:auto; align-self:stretch;
    margin:0; padding:6px 0 4px; gap:10px; }
  .these-pied .cartel-ciel { width:236px; margin:0; transform:rotate(1.2deg); padding:46px 16px 12px; }
  .cartel-ciel .t { font-size:16.5px; }
  .these-pied .site-signature { margin-top:0; }
  /* V419 (Anne, 17 nov. 2026 : la tranche, 303 × 77 px sur un écran de 915 × 356, « on n'hésite pas ») : fermée, la
     tranche déborde du livre de part et d'autre, d'autant que la place le permet (la marge de la page à gauche, l'écart
     avant le cartel à droite, 58 px au plus de chaque côté). Le livre ouvert, lui, ne change pas. */
  .tranche { width:calc(88% + 2 * min(58px, (100vw - 100% - 338px) / 2)); }
  .invite { top:6%; }   /* la tranche agrandie montait sur « Touche la thèse pour l'ouvrir » */
}
