/* Wintg Dossier - atelier (25 nov. 2026) : la même fenêtre que le studio de Wintg QR.
   Ordinateur : pages et réglages à gauche, page choisie à droite, barre du bas avec le poids du fichier.
   Téléphone : la page en haut, onglets Pages / Envoi / Fichier, puis le bouton Télécharger. */

.studio-page { position: relative; background: var(--fond); }
.aura { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.aura i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(6vmax); opacity: .5; }
.aura i:nth-child(1) { left: -30vmax; top: -24vmax; background: #FFC59B; }
.aura i:nth-child(2) { right: -30vmax; top: -18vmax; background: #FFE2A1; }
.aura i:nth-child(3) { left: -26vmax; bottom: -30vmax; background: #F7B7C5; }
.aura i:nth-child(4) { right: -28vmax; bottom: -28vmax; background: #B7E3CF; }

/* En-tête : posé sur la page, sans fond ni ombre */
.haut-studio { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: calc(1rem + env(safe-area-inset-top)) var(--marge) 1rem; }
.haut-studio__retour { display: inline-flex; align-items: center; gap: .6rem; }
.haut-studio__retour img { width: 5.2rem; height: auto; }
.haut-studio__retour .mono { font-size: .9rem; transition: transform .25s; }
.haut-studio__retour:hover .mono { transform: translateX(-.2rem); }
.haut-studio__lien:hover { color: var(--taupe); }

/* ------------------------------------------------------------------ la fenêtre */

.atelier { position: relative; z-index: 1; padding: 0 var(--marge); }
.fenetre { display: grid; grid-template-columns: 24rem minmax(0, 1fr); grid-template-areas: "panneau vue"; gap: .5rem; height: max(38rem, calc(100vh - 5.5rem)); height: max(38rem, calc(100svh - 5.5rem));
  padding: .5rem; border-radius: 1.75rem; background: rgba(255, 253, 250, .78); box-shadow: inset 0 0 0 .0625rem rgba(229, 214, 194, .9), 0 1.5rem 3rem -2rem rgba(58, 28, 10, .25);
  -webkit-backdrop-filter: blur(1.5rem); backdrop-filter: blur(1.5rem); }

/* Réglages */
.panneau { grid-area: panneau; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: .35rem 1.25rem 1.25rem; border-radius: 1.35rem; background: rgba(244, 235, 223, .85);
  scrollbar-width: thin; scrollbar-color: var(--sable-f) transparent; }
.onglets { display: none; }
.bloc { border-bottom: .0625rem solid var(--ligne); }
.bloc:last-of-type { border-bottom: 0; }
.bloc__tete { display: flex; align-items: center; gap: .7rem; width: 100%; padding: 1.15rem 0 1rem; text-align: left; }
.bloc__num { color: var(--taupe-c); }
.bloc__nom { flex: 1; color: var(--encre); }
.bloc__tete .i { width: 1rem; height: 1rem; color: var(--taupe); transition: transform .3s; }
.bloc.est-ouvert .bloc__tete .i { transform: rotate(180deg); }
.bloc__corps { display: none; gap: .85rem; padding: 0 0 1.35rem; }
.bloc.est-ouvert .bloc__corps { display: grid; }
.sous-titre { margin: .35rem 0 -.35rem; color: var(--taupe); }
.panneau__pied { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 0; font-size: .78rem; color: var(--taupe); }
.panneau__pied .i { width: .95rem; height: .95rem; }

.types { display: flex; gap: .4rem; overflow-x: auto; margin: 0 -1.25rem; padding: .1rem 1.25rem .3rem; scrollbar-width: none; }
.types::-webkit-scrollbar { display: none; }
.type { display: inline-flex; align-items: center; gap: .4rem; height: 2.2rem; padding: 0 .85rem 0 .7rem; border-radius: 999px; background: rgba(255, 253, 250, .9); font-size: .84rem; white-space: nowrap; flex: none;
  box-shadow: inset 0 0 0 .0625rem var(--ligne); transition: background .2s, color .2s; }
.type .i { width: 1rem; height: 1rem; }
.type:hover { background: #fff; }
.type[aria-selected="true"] { background: var(--encre); color: var(--os); box-shadow: none; }
.champs { display: grid; gap: .8rem; }
.champ__nom small { color: var(--taupe); font-size: .7rem; }
.champs__ligne { display: grid; grid-template-columns: 7.2rem 1fr; gap: .5rem; }
.champs__deux { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.panneau .champ__saisie, .panneau .liste__bouton { background: rgba(255, 253, 250, .92); }
.panneau .champ__saisie:focus { background: #fff; }
.lien-tchin { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border-radius: .9rem; background: #F8E2CC; font-size: .86rem; }
.lien-tchin a { font: 400 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--orange-f); white-space: nowrap; display: inline-flex; gap: .3rem; align-items: center; }
.lien-tchin .i { width: .95rem; height: .95rem; }

.depot { display: grid; justify-items: center; gap: .3rem; width: 100%; padding: 1.7rem 1rem; border-radius: 1.1rem; background: rgba(255, 253, 250, .6); border: .09375rem dashed var(--taupe-c); text-align: center; transition: background .2s, border-color .2s; }
.depot:hover, .depot.est-survole { background: #fff; border-color: var(--encre); }
.depot__icone { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-bottom: .4rem; border-radius: .8rem; background: #fff; box-shadow: var(--ombre-douce); }
.depot__icone .i { width: 1.15rem; height: 1.15rem; }
.depot b { font-weight: 500; font-size: .98rem; }
.depot span { font-size: .8rem; color: var(--taupe); }
.depot-plein { display: flex; align-items: center; gap: .85rem; padding: .7rem .8rem .7rem .7rem; border-radius: 1.1rem; background: rgba(255, 253, 250, .92); }
.depot-plein img { width: 3.1rem; height: 3.1rem; border-radius: .65rem; object-fit: cover; }
.depot-plein div { flex: 1; display: grid; gap: .15rem; min-width: 0; }
.depot-plein b { font-size: .92rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.depot-plein span { color: var(--taupe); }
.depot-plein__retirer { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--taupe); }
.depot-plein__retirer:hover { background: var(--sable); color: var(--encre); }
.depot-plein__retirer .i { width: 1rem; height: 1rem; }
.galerie-choix { display: flex; gap: .45rem; overflow-x: auto; margin: 0 -1.25rem; padding: .3rem 1.25rem .4rem; scrollbar-width: none; }
.galerie-choix::-webkit-scrollbar { display: none; }
.vignette { position: relative; flex: none; width: 3.1rem; height: 3.1rem; border-radius: .75rem; overflow: hidden; background: rgba(255, 253, 250, .9); box-shadow: inset 0 0 0 .0625rem var(--ligne);
  transition: transform .2s, box-shadow .2s; display: grid; place-items: center; color: var(--taupe); }
.vignette img { width: 100%; height: 100%; object-fit: cover; }
.vignette:hover { transform: translateY(-.125rem); }
.vignette[aria-checked="true"] { box-shadow: 0 0 0 .125rem var(--sable), 0 0 0 .25rem var(--encre); }
.vignette--rien { font: 400 .55rem/1.15 var(--mono); letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: .2rem; }

.curseurs { display: grid; gap: .45rem; }
.curseurs:empty { display: none; }
.curseur { position: relative; display: flex; justify-content: space-between; align-items: center; height: 2.6rem; padding: 0 1rem; border-radius: .8rem; background: rgba(255, 253, 250, .92); overflow: hidden;
  cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.curseur__rempli { position: absolute; inset: 0; background: var(--sable-f); transform-origin: left; transform: scaleX(0); }
.curseur__nom, .curseur__valeur { position: relative; font-size: .86rem; white-space: nowrap; }
.curseur__valeur { font: 400 .8rem var(--mono); color: var(--encre); }

.segments { display: flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(255, 253, 250, .7); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
.segments__bouton { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; height: 2.1rem; padding: 0 .75rem; border-radius: 999px;
  font: 400 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.segments__bouton:hover { color: var(--encre); }
.segments__bouton[aria-checked="true"] { background: #fff; color: var(--encre); box-shadow: var(--ombre-douce); }
.segments--tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.3rem, 1fr)); gap: .4rem; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.segments--tuiles .segments__bouton { flex-direction: column; height: auto; padding: .7rem .3rem .6rem; border-radius: .9rem; background: rgba(255, 253, 250, .92); gap: .45rem; font-size: .6rem; }
.segments--tuiles .segments__bouton[aria-checked="true"] { background: #fff; box-shadow: inset 0 0 0 .125rem var(--encre); }
.segments--tuiles svg.mini { width: 1.9rem; height: 1.9rem; }

.pastilles { display: flex; flex-wrap: wrap; gap: .45rem; }
.pastille { position: relative; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 .0625rem rgba(23, 17, 13, .15); transition: transform .2s; }
.pastille:hover { transform: scale(1.06); }
.pastille[aria-checked="true"] { box-shadow: 0 0 0 .125rem var(--sable), 0 0 0 .25rem var(--encre); }
.pastille--auto { background: conic-gradient(#E17A21, #7a1020, #1d2a6b, #0f3d2e, #E17A21); }
.pastille--auto::after { content: "Auto"; position: absolute; inset: .3rem; border-radius: 50%; background: #fff; display: grid; place-items: center; font: 400 .5rem/1 var(--mono); letter-spacing: .02em; text-transform: uppercase; }

.interrupteur { display: flex; align-items: center; gap: .6rem; font-size: .88rem; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; pointer-events: none; }
.interrupteur__piste { position: relative; width: 2.4rem; height: 1.4rem; border-radius: 999px; background: var(--sable-f); transition: background .2s; flex: none; }
.interrupteur__piste::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; box-shadow: var(--ombre-douce); transition: transform .25s; }
.interrupteur input:checked + .interrupteur__piste { background: var(--encre); }
.interrupteur input:checked + .interrupteur__piste::after { transform: translateX(1rem); }
.interrupteur input:focus-visible + .interrupteur__piste { outline: .125rem solid var(--orange); outline-offset: .125rem; }
.interrupteur small { margin-left: auto; color: var(--taupe-c); font-size: .62rem; }
.modeles { display: flex; flex-wrap: wrap; gap: .35rem; }
.modeles .type { height: 2rem; font-size: .8rem; padding: 0 .8rem; }

/* Aperçu */
.vue { grid-area: vue; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: 1.1rem 1.4rem 1.2rem; }
.vue__haut { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.25rem; }
.vue__titre { margin: 0; color: var(--encre); }
.vue__resume { flex: none; max-width: 100%; min-height: 1.1rem; margin: .9rem 0 0; text-align: center; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: .02em; }
.vue__resume b { font-weight: 400; color: var(--orange-f); }
.vue__lecture { display: flex; align-items: center; gap: .5rem; }
.vue__scene { position: relative; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem 0 .4rem; }
.vue__cadre { position: relative; touch-action: none; }
.vue__canvas { display: block; filter: drop-shadow(0 1rem 1.6rem rgba(58, 28, 10, .18)); }
.vue__cadre.est-format .vue__canvas { filter: drop-shadow(0 .8rem 1.6rem rgba(58, 28, 10, .22)); }
.vue__cadre.est-statut .vue__canvas { border-radius: 1.1rem; box-shadow: 0 0 0 .35rem var(--encre); filter: drop-shadow(0 1rem 1.6rem rgba(58, 28, 10, .3)); }
.contour { position: absolute; border: .125rem dashed rgba(23, 17, 13, .75); box-shadow: 0 0 0 .0625rem rgba(255, 255, 255, .7), inset 0 0 0 .0625rem rgba(255, 255, 255, .7);
  border-radius: 50%; cursor: grab; touch-action: none; }
.contour.est-rect { border-radius: .5rem; }
.contour:active { cursor: grabbing; }
.contour__poignee { position: absolute; right: -.55rem; bottom: -.55rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--encre); box-shadow: 0 0 0 .1875rem #fff; cursor: nwse-resize; }
.contour.est-ellipse .contour__poignee { right: 12%; bottom: 12%; transform: translate(50%, 50%); }

.outils { display: flex; align-items: center; gap: .6rem; flex-wrap: nowrap; }
.outils__formats .segments__bouton, .outils__options .segments__bouton { padding: 0 .8rem; }
.outils__options:empty { display: none; }
.outils__taille { margin: 0 0 0 .2rem; color: var(--taupe); white-space: nowrap; }
.outils__boutons { margin-left: auto; display: flex; gap: .45rem; }
.outils__telecharger { height: 2.75rem; }
.vue__message { margin-top: .6rem; opacity: 0; }
.vue__message.est-visible { opacity: 1; }

.arranger { display: inline-flex; align-items: center; gap: .35rem; height: 2rem; padding: 0 .8rem; border-radius: 999px; background: var(--orange); color: var(--encre); }
.arranger .i { width: .95rem; height: .95rem; }
.arranger:disabled { opacity: .5; }
.lecture { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .45rem .8rem .45rem .7rem; border-radius: 999px; background: rgba(255, 253, 250, .9);
  font: 400 .7rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--taupe); box-shadow: inset 0 0 0 .0625rem var(--ligne); white-space: nowrap; }
.lecture__point { width: .5rem; height: .5rem; border-radius: 50%; background: var(--taupe-c); flex: none; }
.lecture[data-etat="ok"] { color: var(--vert); background: var(--vert-c); box-shadow: none; }
.lecture[data-etat="ok"] .lecture__point { background: var(--vert); }
.lecture[data-etat="moyen"] { color: #A15C07; background: #FDF0DC; box-shadow: none; }
.lecture[data-etat="moyen"] .lecture__point { background: #D97706; }
.lecture[data-etat="non"] { color: var(--rouge); background: var(--rouge-c); box-shadow: none; }
.lecture[data-etat="non"] .lecture__point { background: var(--rouge); }
.lecture[data-etat="attente"] .lecture__point { animation: battement 1s infinite; }
@keyframes battement { 50% { opacity: .3; } }

/* Derniers codes */
.recents { max-width: 84rem; margin: 1.5rem auto 0; padding: 1.1rem 1.25rem 1.25rem; border-radius: 1.5rem; background: rgba(255, 253, 250, .78); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
.recents__titre { margin: 0 0 .8rem; color: var(--taupe); }
.recents__grille { display: grid; grid-template-columns: repeat(10, 1fr); gap: .5rem; }
.recent { position: relative; border-radius: .75rem; overflow: hidden; background: var(--sable); aspect-ratio: 1; }
.recent > button:first-child { width: 100%; height: 100%; padding: .3rem; }
.recent img { width: 100%; height: 100%; object-fit: contain; }
.recent__suppr { position: absolute; top: .2rem; right: .2rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: rgba(23, 17, 13, .7); color: #fff; opacity: 0; transition: opacity .2s; }
.recent__suppr .i { width: .85rem; height: .85rem; }
.recent:hover .recent__suppr, .recent__suppr:focus-visible { opacity: 1; }
@media (hover: none) { .recent__suppr { opacity: 1; } }

.studio-page .questions { position: relative; z-index: 1; margin-top: 3.5rem; }
.studio-page .questions .titre-section { margin-bottom: 1.5rem; }
.studio-page .faq { background: rgba(255, 253, 250, .78); }
.studio-page .pied { position: relative; z-index: 1; }

/* Tablette : la barre d'outils passe sur deux lignes */
@media (max-width: 1180px) and (min-width: 768px) {
  .fenetre { grid-template-columns: 21rem minmax(0, 1fr); }
  .outils { flex-wrap: wrap; row-gap: .5rem; }
  .outils__boutons { margin-left: auto; }
}

/* ------------------------------------------------------------------ téléphone : comme une appli, de haut en bas */
@media (max-width: 767px) {
  .haut-studio { padding-bottom: .75rem; }
  .haut-studio__retour img { width: 4.6rem; }
  .atelier { padding: 0 .6rem; }
  .fenetre { display: flex; flex-direction: column; height: auto; padding: .45rem; border-radius: 1.5rem; gap: .45rem; }
  .vue { display: contents; }
  .vue__haut { order: 1; padding: .4rem .3rem 0; flex-direction: column; align-items: stretch; gap: .5rem; }
  .vue__haut .segments { width: 100%; }
  .vue__lecture { justify-content: center; }
  .vue__resume { margin-top: .7rem; }
  .vue__scene { order: 2; padding: .4rem .5rem .8rem; }
  .panneau { order: 3; overflow: visible; padding: .35rem .9rem 1rem; border-radius: 1.2rem; }
  .outils { order: 4; flex-direction: column; align-items: stretch; gap: .5rem; padding: 0 .1rem .2rem; }
  .vue__message { order: 5; margin: 0 0 .4rem; }
  .outils__formats .segments, .outils__options .segments { width: 100%; }
  .outils__formats .segments__bouton, .outils__options .segments__bouton { padding: 0 .3rem; flex: 1; font-size: .66rem; }
  .outils__taille { margin: 0 .3rem; }
  .outils__boutons { margin: 0; }
  .outils__telecharger { flex: 1; height: 3rem; }
  .outils__boutons .bouton--icone { height: 3rem; width: 3rem; }
  .onglets { display: flex; gap: .2rem; margin: .2rem -.45rem .4rem; padding: .25rem; border-radius: 999px; background: rgba(255, 253, 250, .75); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
  .onglet { flex: 1; height: 2.3rem; border-radius: 999px; font: 400 .64rem/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--taupe); white-space: nowrap; }
  .onglet[aria-selected="true"] { background: #fff; color: var(--encre); box-shadow: var(--ombre-douce); }
  .bloc { border: 0; display: none; }
  .bloc.est-actif { display: block; }
  .bloc__tete { display: none; }
  .bloc .bloc__corps { display: grid; padding: .5rem 0 .4rem; }
  .types, .galerie-choix { margin: 0 -.9rem; padding-left: .9rem; padding-right: .9rem; }
  .panneau__pied { display: none; }
  .recents { margin: 1rem .6rem 0; }
  .recents__grille { grid-template-columns: repeat(5, 1fr); }
  .vue__cadre.est-statut .vue__canvas { border-radius: .9rem; box-shadow: 0 0 0 .25rem var(--encre); }
}
.cadre-couleur { display: grid; gap: .85rem; }
.cadre-couleur[hidden] { display: none; }

/* ================================================================== Wintg Dossier : éléments propres à l'atelier */

.haut-studio { gap: 1rem; }
.bascule { display: flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: rgba(255, 253, 250, .7); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
.bascule__lien { display: inline-flex; align-items: center; height: 2.1rem; padding: 0 1rem; border-radius: 999px; color: var(--taupe); white-space: nowrap; transition: background .2s, color .2s; }
.bascule__lien:hover { color: var(--encre); }
.bascule__lien[aria-current="page"] { background: var(--encre); color: var(--os); }
.haut-studio__lien .court { display: none; }

.vue__haut[hidden], .outils[hidden] { display: none; }
.vue__actions { display: flex; align-items: center; gap: .4rem; }
.pilule-claire { display: inline-flex; align-items: center; gap: .4rem; height: 2.25rem; padding: 0 .95rem; border-radius: 999px; background: rgba(255, 253, 250, .92);
  box-shadow: inset 0 0 0 .0625rem var(--ligne); color: var(--encre); white-space: nowrap; transition: background .2s; }
.pilule-claire:hover { background: #fff; }
.pilule-claire .i { width: 1rem; height: 1rem; }
.rond { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(255, 253, 250, .92); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
.rond:hover { background: #fff; }
.rond .i { width: 1.05rem; height: 1.05rem; }

/* Rien encore : trois façons d'ajouter */
.vide { display: grid; justify-items: center; text-align: center; gap: 1rem; max-width: 40rem; }
.vide[hidden] { display: none; }
.vide .etiquette { margin: 0; }
.vide__titre { margin: 0 0 .6rem; font-size: 2.6rem; font-weight: 500; line-height: 1.02; letter-spacing: -.045em; }
.vide__note { display: inline-flex; align-items: center; gap: .45rem; margin: .8rem 0 0; color: var(--taupe); }
.vide__note .i { width: .95rem; height: .95rem; }
.ajouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; width: 100%; }
.ajout { display: grid; justify-items: center; gap: .3rem; padding: 1.4rem .8rem 1.2rem; border-radius: 1.25rem; background: rgba(255, 253, 250, .92);
  box-shadow: inset 0 0 0 .0625rem var(--ligne); text-align: center; transition: transform .2s, background .2s, box-shadow .2s; }
.ajout:hover { transform: translateY(-.125rem); background: #fff; box-shadow: inset 0 0 0 .0625rem var(--ligne), var(--ombre-douce); }
.ajout .i { width: 1.7rem; height: 1.7rem; margin-bottom: .35rem; }
.ajout b { font-weight: 500; font-size: 1.02rem; letter-spacing: -.01em; }
.ajout span { font-size: .8rem; color: var(--taupe); }
.ajout--fort { background: var(--encre); color: var(--os); box-shadow: none; }
.ajout--fort:hover { background: #2a221c; box-shadow: var(--ombre-douce); }
.ajout--fort span { color: var(--taupe-c); }
.vue__scene.est-survole .vide { outline: .125rem dashed var(--encre); outline-offset: 1.2rem; border-radius: 1.5rem; }
.ajouts--petits { gap: .4rem; }
.ajouts--petits .ajout { grid-auto-flow: column; justify-content: center; align-items: center; gap: .45rem; padding: .8rem .5rem; border-radius: .95rem; }
.ajouts--petits .ajout .i { width: 1.15rem; height: 1.15rem; margin: 0; }
.ajouts--petits .ajout b { font-size: .9rem; }

/* La page choisie */
.vue__scene { overflow: hidden; }
.planche { position: relative; margin: 0; display: flex; align-items: center; justify-content: center; flex: 1 1 auto; width: 100%; min-height: 0; }
.planche[hidden] { display: none; }
.planche__page { display: block; max-width: 100%; max-height: 100%; border-radius: .35rem; background: #fff;
  box-shadow: 0 .0625rem .125rem rgba(58, 28, 10, .1), 0 1.4rem 2.6rem -1.2rem rgba(58, 28, 10, .38); }
.planche__calcul { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: .55rem .9rem; border-radius: 999px; background: rgba(23, 17, 13, .82); color: var(--os); }
.planche__calcul[hidden] { display: none; }

/* Recadrage : la photo d'origine avec ses 4 coins */
.recadrage { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.recadrage[hidden] { display: none; }
.recadrage__photo { position: absolute; left: 0; top: 0; display: block; border-radius: .3rem; }
.recadrage__cadre { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.recadrage__cadre polygon { fill: rgba(225, 122, 33, .14); stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; }
.poignee { position: absolute; left: 0; top: 0; width: 2.8rem; height: 2.8rem; margin: -1.4rem 0 0 -1.4rem; border-radius: 50%; touch-action: none; cursor: grab;
  background: radial-gradient(circle, #fff 0 30%, var(--orange) 32% 46%, rgba(225, 122, 33, .2) 48%); }
.poignee:active { cursor: grabbing; }
.loupe { position: absolute; left: 0; top: 0; width: 6.6rem; height: 6.6rem; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 .2rem #fff, 0 .6rem 1.4rem rgba(23, 17, 13, .35); }
.loupe[hidden] { display: none; }
.recadrage__barre { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; padding: .4rem 0 0; }
.recadrage__barre[hidden] { display: none; }
.recadrage__espace { flex: 1; }

/* Poids du fichier final */
.poids { display: inline-flex; align-items: center; gap: .55rem; margin: 0; padding: .55rem .95rem .55rem .8rem; border-radius: 999px; background: rgba(255, 253, 250, .9);
  font: 400 .74rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--taupe); box-shadow: inset 0 0 0 .0625rem var(--ligne); min-width: 0; }
.poids span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poids__point { width: .55rem; height: .55rem; border-radius: 50%; background: var(--taupe-c); flex: none; }
.poids[data-etat="ok"] { color: var(--vert); background: var(--vert-c); box-shadow: none; }
.poids[data-etat="ok"] .poids__point { background: var(--vert); }
.poids[data-etat="moyen"] { color: #A15C07; background: #FDF0DC; box-shadow: none; }
.poids[data-etat="moyen"] .poids__point { background: #D97706; }
.poids[data-etat="non"] { color: var(--rouge); background: var(--rouge-c); box-shadow: none; }
.poids[data-etat="non"] .poids__point { background: var(--rouge); }
.poids[data-etat="calcul"] .poids__point { animation: battement 1s infinite; }
.outils__telecharger:disabled { opacity: .4; cursor: default; }

/* Liste des pages */
.bloc__compte { color: var(--taupe); }
.pages { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.pages:empty { display: none; }
.page { position: relative; display: grid; grid-template-columns: auto 3rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; padding: .45rem .45rem .45rem .3rem;
  border-radius: .95rem; background: rgba(255, 253, 250, .92); box-shadow: inset 0 0 0 .0625rem transparent; cursor: pointer; transition: box-shadow .2s, background .2s; }
.page:hover { background: #fff; }
.page[aria-current="true"] { background: #fff; box-shadow: inset 0 0 0 .125rem var(--encre); }
.page.est-saisie { z-index: 2; box-shadow: inset 0 0 0 .125rem var(--encre), var(--ombre); transition: none; }
.page__poignee { display: grid; place-items: center; width: 1.7rem; height: 2.8rem; color: var(--taupe-c); cursor: grab; touch-action: none; }
.page__poignee .i { width: 1rem; height: 1rem; }
.page__vignette { width: 3rem; height: 3.6rem; border-radius: .3rem; object-fit: cover; background: var(--sable); box-shadow: 0 0 0 .0625rem var(--ligne); }
.page__texte { display: grid; gap: .15rem; min-width: 0; }
.page__texte b { font-weight: 500; font-size: .92rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page__texte span { min-width: 0; }
.page__texte span { font: 400 .66rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page__actions { display: flex; gap: .1rem; }
.page__actions button { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--taupe); }
.page__actions button:hover { background: var(--sable); color: var(--encre); }
.page__actions button:disabled { opacity: .3; pointer-events: none; }
.page__actions .i { width: .95rem; height: .95rem; }

/* Destinations */
.destinations { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.destination { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .6rem; row-gap: .1rem; align-items: center; padding: .75rem .8rem;
  border-radius: .95rem; background: rgba(255, 253, 250, .92); text-align: left; transition: box-shadow .2s, background .2s; }
.destination:hover { background: #fff; }
.destination .i { grid-row: 1 / 3; width: 1.25rem; height: 1.25rem; color: var(--taupe); }
.destination b { font-weight: 500; font-size: .88rem; line-height: 1.15; }
.destination span { font-size: .62rem; color: var(--taupe); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.destination[aria-checked="true"] { background: #fff; box-shadow: inset 0 0 0 .125rem var(--encre); }
.destination[aria-checked="true"] .i { color: var(--encre); }
.destination:last-child { grid-column: 1 / -1; }
.champ[hidden] { display: none; }
.champ__unite { position: relative; display: block; }
.champ__unite b { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-weight: 400; color: var(--taupe); }
.panneau .interrupteur { padding: .2rem 0; }

@media (max-width: 1180px) and (min-width: 768px) {
  .vue__haut { flex-wrap: wrap; row-gap: .5rem; }
  .vide__titre { font-size: 2.2rem; }
}

@media (max-width: 767px) {
  .haut-studio { flex-wrap: wrap; }
  .bascule { order: 3; width: 100%; }
  .bascule__lien { flex: 1; justify-content: center; }
  .haut-studio__lien .large { display: none; }
  .haut-studio__lien .court { display: inline; }
  .vue__haut { flex-direction: column; align-items: stretch; }
  .vue__haut .segments__bouton { padding: 0 .2rem; font-size: .62rem; }
  .vue__actions { justify-content: center; }
  .vue__scene { min-height: 0; padding: .4rem .3rem .6rem; }
  .vue__scene.a-page { height: 60vh; height: 60svh; }
  .vide { padding: 1.2rem .4rem .6rem; }
  .vide__titre { font-size: 1.9rem; }
  .ajouts { grid-template-columns: 1fr; }
  .vide .ajout { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: .9rem; padding: 1rem 1.1rem; }
  .vide .ajout .i { grid-row: 1 / 3; margin: 0; }
  .ajouts--petits { grid-template-columns: repeat(3, 1fr); }
  .recadrage__barre { order: 2; padding: 0 .2rem; }
  .recadrage__barre .bouton { flex: 1; }
  .recadrage__espace { flex-basis: 100%; height: 0; }
  .outils { flex-direction: column; align-items: stretch; }
  .poids { justify-content: center; }
}

.message[data-genre="moyen"] { color: #A15C07; }
.vue { grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
.vue > .vue__haut { grid-row: 1; }
.vue > .vue__scene { grid-row: 2; }
.vue > .recadrage__barre { grid-row: 3; }
.vue > .outils { grid-row: 4; }
.vue > .vue__message { grid-row: 5; }
.segments--court { flex: none; }
.segments--court .segments__bouton { padding: 0 .9rem; }
@media (max-width: 767px) { .fenetre.est-vide .panneau, .fenetre.est-vide .outils { display: none; } }

/* ================================================================== Photo d'identité */
.ajouts--deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cadrage { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; }
.cadrage[hidden] { display: none; }
.cadrage__fenetre { position: relative; flex: none; border-radius: .35rem; overflow: hidden; background: #fff; touch-action: none; cursor: grab;
  box-shadow: 0 .0625rem .125rem rgba(58, 28, 10, .1), 0 1.4rem 2.6rem -1.2rem rgba(58, 28, 10, .38); }
.cadrage__fenetre:active { cursor: grabbing; }
.cadrage__photo { display: block; width: 100%; height: 100%; }
.cadrage__guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cadrage__guide ellipse { fill: none; stroke: #E17A21; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; stroke-width: 2; }
.cadrage__guide line { stroke: rgba(225, 122, 33, .7); stroke-width: 1.5; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.photo-page .outils__boutons .bouton--clair { height: 2.75rem; }
@media (max-width: 767px) {
  .photo-page .vue__scene.a-page, .photo-page .cadrage:not([hidden]) { min-height: 58vh; min-height: 58svh; }
  .photo-page .outils__boutons { flex-wrap: wrap; }
  .photo-page .outils__boutons .bouton { flex: 1 1 100%; height: 3rem; }
}
@media (max-width: 767px) { .vide .ajouts--deux { grid-template-columns: 1fr; } }

/* ================================================================== Convertir */
.ajouts--un { grid-template-columns: minmax(0, 22rem); justify-content: center; }
.formats-vus { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.formats-vus li { padding: .35rem .6rem; border-radius: .5rem; background: rgba(255, 253, 250, .9); box-shadow: inset 0 0 0 .0625rem var(--ligne); font-size: .62rem; color: var(--taupe); }
.format { display: inline-grid; place-items: center; min-width: 4.6rem; height: 2.6rem; padding: 0 .9rem; border-radius: .7rem; background: #D93025; color: #fff;
  font: 400 .9rem/1 var(--mono); letter-spacing: .06em; white-space: nowrap; box-shadow: 0 .6rem 1.2rem -.6rem rgba(23, 17, 13, .45); }
.format[data-famille="word"] { background: #2B579A; }
.format[data-famille="excel"] { background: #1E7145; }
.format[data-famille="diapo"] { background: #C43E1C; }
.format[data-famille="image"], .format[data-famille="imageServeur"] { background: #6D28D9; }
.format[data-famille="pdf"] { background: #D93025; }
.format--petit { min-width: 3rem; height: 2.4rem; padding: 0 .4rem; font-size: .62rem; border-radius: .55rem; box-shadow: none; }
.conversion { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; }
.conversion[hidden] { display: none; }
.conversion__fleche { display: flex; align-items: center; gap: .8rem; }
.conversion__trait { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgba(255, 253, 250, .92); box-shadow: inset 0 0 0 .0625rem var(--ligne); }
.conversion__trait .i { width: 1.1rem; height: 1.1rem; }
.conversion__apercu { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; margin: 0; display: flex; align-items: center; justify-content: center; }
.conversion__apercu img, .conversion__page { display: block; max-width: 100%; max-height: 100%; border-radius: .35rem; background: #fff;
  box-shadow: 0 .0625rem .125rem rgba(58, 28, 10, .1), 0 1.4rem 2.6rem -1.2rem rgba(58, 28, 10, .38); }
.carte-doc { position: relative; display: grid; align-content: end; gap: .6rem; width: min(15rem, 70%); aspect-ratio: 1 / 1.3; padding: 1.4rem; border-radius: .8rem; background: #fff;
  box-shadow: 0 .0625rem .125rem rgba(58, 28, 10, .1), 0 1.4rem 2.6rem -1.2rem rgba(58, 28, 10, .38); }
.carte-doc__lignes { position: absolute; left: 1.4rem; right: 1.4rem; top: 1.6rem; display: grid; gap: .55rem; }
.carte-doc__lignes i { height: .45rem; border-radius: .2rem; background: var(--sable-f); }
.carte-doc__lignes i:nth-child(1) { width: 60%; background: var(--taupe-c); }
.carte-doc__lignes i:nth-child(3) { width: 85%; }
.carte-doc__lignes i:nth-child(5) { width: 70%; }
.carte-doc b { justify-self: start; padding: .4rem .6rem; border-radius: .45rem; background: #D93025; color: #fff; font-weight: 400; font-size: .8rem; letter-spacing: .06em; }
.carte-doc[data-famille="word"] b { background: #2B579A; }
.carte-doc[data-famille="excel"] b { background: #1E7145; }
.carte-doc[data-famille="diapo"] b { background: #C43E1C; }
.carte-doc[data-famille="image"] b, .carte-doc[data-famille="imageServeur"] b { background: #6D28D9; }
.carte-doc__nom { font-size: .85rem; color: var(--taupe); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fichier { grid-template-columns: auto minmax(0, 1fr) auto auto; padding-left: .45rem; cursor: default; }
.fichier__signe { display: grid; place-items: center; width: 1.6rem; }
.fichier__signe .i { width: 1.1rem; height: 1.1rem; }
.fichier[data-etat="fait"] .fichier__signe { color: var(--vert); }
.fichier[data-etat="erreur"] .fichier__signe { color: var(--rouge); }
.fichier[data-etat="erreur"] .page__texte span { color: var(--rouge); white-space: normal; }
.tourne { display: block; width: 1rem; height: 1rem; border-radius: 50%; border: .15rem solid var(--sable-f); border-top-color: var(--encre); animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.vide-cibles { margin: 0; color: var(--rouge); grid-column: 1 / -1; }
.lien-atelier { display: inline-flex; align-items: center; gap: .45rem; color: var(--orange-f); }
.lien-atelier[hidden] { display: none; }
.lien-atelier .i { width: 1rem; height: 1rem; }
.convertir-page .destination:last-child { grid-column: auto; }
.convertir-page .destinations .destination:only-child, .convertir-page .destinations .destination:nth-child(odd):last-child { grid-column: 1 / -1; }
.poids[data-etat="pret"] { color: var(--encre); }
.poids[data-etat="pret"] .poids__point { background: var(--orange); }
@media (max-width: 767px) {
  .conversion { min-height: 56vh; min-height: 56svh; }
  .format { min-width: 3.8rem; height: 2.3rem; font-size: .78rem; }
  .bascule__lien { padding: 0 .4rem; font-size: .66rem; }
}
