/* IG bas — direction artistique « étiquette de marché ».
   Encre noire et papier clair, couleurs franches de marché (pistache, citron, radis, sapin), traits nets et
   ombres décalées dures plutôt que des ombres floues. Titres en Bricolage Grotesque (licence OFL, hébergée
   dans assets/polices), texte courant dans la police du système.
   Pensée d'abord pour le smartphone : onglets en bas d'écran, tableaux en fiches, champs de 16 px. */

@font-face {
	font-family: "Bricolage Grotesque";
	src: url("polices/bricolage-grotesque.woff2") format("woff2");
	font-weight: 200 800;
	font-display: swap;
}

:root {
	color-scheme: light;
	--papier: #F4F5EF;
	--blanc: #FFFFFF;
	--encre: #121212;
	--gris: #55574F;
	--ligne: #121212;
	--ligne-douce: #DADBD2;
	--pistache: #C6F05A;
	--pistache-clair: #EAF9C6;
	--citron: #FFD43B;
	--citron-clair: #FFF3C4;
	--radis: #FF4F6D;
	--radis-clair: #FFD9DF;
	--sapin: #0E4D3A;
	--ig-bas: #C6F05A;
	--ig-moyen: #FFD43B;
	--ig-eleve: #FF8FA0;
	--trait: 2px solid var(--encre);
	--ombre: 5px 5px 0 var(--encre);
	--ombre-petite: 3px 3px 0 var(--encre);
	--rayon: 18px;
	--rayon-petit: 12px;
	--titres: "Bricolage Grotesque", "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--encre); font: 16px/1.55 var(--texte); -webkit-font-smoothing: antialiased; }
a { color: var(--encre); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--radis); }
a:hover { text-decoration-color: var(--encre); }
img, svg { max-width: 100%; }
code { background: var(--citron-clair); border: 1px solid var(--encre); padding: 0 5px; border-radius: 5px; font-size: .9em; }
mark { background: var(--pistache); color: inherit; padding: 0 .14em; border-radius: .18em; white-space: nowrap; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--radis); outline-offset: 2px; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--titres); font-weight: 800; color: var(--encre); letter-spacing: -.025em; }
h1 { font-size: clamp(32px, 6.5vw, 52px); line-height: 1.02; margin: 0 0 12px; }
h2 { font-size: clamp(24px, 4vw, 30px); line-height: 1.1; margin: 44px 0 16px; }
h3 { font-size: 19px; line-height: 1.2; margin: 0; }
h4 { font-size: 17px; margin: 0 0 8px; }
.sous-titre { color: var(--gris); margin: 0 0 24px; font-size: 17px; max-width: 44em; }
/* Petit autocollant au-dessus des titres */
.surtitre { display: inline-block; margin: 0 0 14px; padding: 3px 10px; background: var(--citron); border: var(--trait); border-radius: 8px;
	font-family: var(--titres); font-weight: 700; font-size: 14px; letter-spacing: 0; transform: rotate(-2deg); }

/* ---------- En-tête et navigation ---------- */
.barre { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px 28px; padding: 12px 28px;
	background: var(--blanc); border-bottom: var(--trait); }
.marque { display: inline-flex; align-items: center; gap: 10px; font-family: var(--titres); font-weight: 800; font-size: 24px;
	letter-spacing: -.04em; color: var(--encre); text-decoration: none; flex: none; }
.marque .logo { width: 36px; height: 36px; }
.nav-principale { display: flex; gap: 6px; flex: 1; }
.nav-principale a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 2px solid transparent; border-radius: 11px;
	color: var(--encre); font-weight: 650; font-size: 15px; text-decoration: none; }
.nav-principale a .icone { width: 19px; height: 19px; }
.nav-principale a:hover { border-color: var(--encre); }
.nav-principale a.actif { background: var(--pistache); border-color: var(--encre); }
.compte-entete { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.compte-entete .qui { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 650; color: var(--encre); text-decoration: none; }
.compte-entete .qui:hover .nom, .compte-entete .qui.actif .nom { text-decoration: underline; text-underline-offset: 3px; }
.compte-entete .qui:hover .avatar, .compte-entete .qui.actif .avatar { background: var(--pistache); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--citron); border: var(--trait); display: grid; place-items: center;
	font-family: var(--titres); font-weight: 800; font-size: 16px; }
.bouton-icone { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--encre);
	border: var(--trait); background: var(--blanc); }
.bouton-icone:hover { background: var(--radis-clair); }
.bouton-icone .icone { width: 20px; height: 20px; }
.lien-discret { color: var(--encre); font-weight: 650; text-decoration: none; font-size: 15px; padding: 8px 6px; }
.lien-discret:hover { text-decoration: underline; text-decoration-color: var(--radis); }
.mobile-seul { display: none !important; }

/* ---------- Page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 32px 24px 56px; }
.pied { background: var(--encre); color: #C9CBC2; margin-top: 24px; }
.pied-int { max-width: 1120px; margin: 0 auto; padding: 28px 24px 36px; display: flex; gap: 16px 32px; align-items: flex-start; }
.pied-int .marque { color: var(--blanc); font-size: 20px; }
.pied p { margin: 0; font-size: 13.5px; max-width: 60em; }

.entete-page { display: grid; grid-template-columns: 1fr; align-items: center; gap: 12px 36px; margin-bottom: 12px; }
.entete-page.avec-illu { grid-template-columns: 1fr 210px; }
.entete-illu { border: var(--trait); border-radius: var(--rayon); padding: 8px 14px; box-shadow: var(--ombre-petite); transform: rotate(2deg);
	background: var(--pistache) radial-gradient(rgba(18, 18, 18, .12) 1px, transparent 1.4px) 0 0 / 14px 14px; }
.entete-illu.fond-toque, .entete-illu.fond-tablier { background-color: var(--citron); }
.entete-illu.fond-carnet { background-color: var(--radis-clair); }
.entete-illu .illu { width: 100%; height: auto; display: block; }

/* Accueil */
.hero { display: grid; grid-template-columns: 1.4fr .6fr; background: var(--blanc); border: 2.5px solid var(--encre); border-radius: 26px;
	box-shadow: 6px 6px 0 var(--encre); overflow: hidden; margin: 0 0 22px; }
.hero-texte { padding: 30px 34px; align-self: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1; letter-spacing: -.045em; margin-bottom: 12px; }
.hero .accroche { font-size: 17px; color: var(--gris); margin: 0 0 20px; max-width: 34em; }
.hero .boutons { margin-top: 0; }
.hero-illu { display: grid; place-items: center; padding: 16px 20px; border-left: 2.5px solid var(--encre);
	background: var(--pistache) radial-gradient(rgba(18, 18, 18, .13) 1.2px, transparent 1.6px) 0 0 / 16px 16px; }
.hero-illu .illu { width: 100%; max-width: 260px; height: auto; display: block; }

/* Raccourcis : petites cartes horizontales */
.raccourcis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 8px; }
.raccourci { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 14px; padding-right: 14px; min-height: 76px;
	background: var(--blanc); border: var(--trait); border-radius: 16px; box-shadow: var(--ombre-petite); color: var(--encre); text-decoration: none;
	overflow: hidden; transition: transform .1s, box-shadow .1s; }
.raccourci:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--encre); color: var(--encre); }
.raccourci:active { transform: translate(2px, 2px); box-shadow: none; }
.raccourci-illu { align-self: stretch; display: grid; place-items: center; padding: 6px; border-right: var(--trait);
	background: var(--citron) radial-gradient(rgba(18, 18, 18, .12) 1px, transparent 1.4px) 0 0 / 12px 12px; }
.raccourci:nth-child(2) .raccourci-illu { background-color: var(--pistache); }
.raccourci:nth-child(3) .raccourci-illu { background-color: var(--radis-clair); }
.raccourci-illu .illu { width: 100%; height: auto; display: block; }
.raccourci-texte { min-width: 0; }
.raccourci-texte strong { display: block; font-family: var(--titres); font-weight: 800; font-size: 18px; letter-spacing: -.02em; line-height: 1.15; }
.raccourci-texte small { display: block; color: var(--gris); font-size: 13.5px; line-height: 1.3; }
.raccourci > .icone { width: 22px; height: 22px; transition: transform .1s; }
.raccourci:hover > .icone { transform: translateX(3px); }

.raccourci-astuces { margin-top: 6px; }
.raccourci-astuces .raccourci-illu { background-color: var(--pistache-clair); }

/* ---------- Astuces de cuisine ---------- */
.astuces-sommaire { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.astuces-sommaire a { padding: 6px 14px; background: var(--blanc); border: var(--trait); border-radius: 999px; font-weight: 700; font-size: 14.5px;
	text-decoration: none; box-shadow: 2px 2px 0 var(--encre); }
.astuces-sommaire a:hover { background: var(--pistache); }
.astuces-rubrique { scroll-margin-top: 90px; }
.astuces-rubrique h2 { margin: 36px 0 14px; }
.astuces-liste { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.astuce-fiche { position: relative; display: flex; flex-direction: column; padding: 18px 20px 0 20px; background: var(--blanc); border: var(--trait);
	border-radius: var(--rayon); box-shadow: var(--ombre-petite); overflow: hidden; }
.astuce-fiche h3 { margin: 0 0 8px; padding-right: 48px; font-size: 19px; letter-spacing: -.02em; }
.astuce-fiche p { margin: 0 0 14px; font-size: 15px; }
.astuce-num { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; display: grid; place-items: center; border: var(--trait); border-radius: 10px;
	font-family: var(--titres); font-weight: 800; font-size: 17px; transform: rotate(4deg); }
.astuce-num.fond-citron { background: var(--citron); }
.astuce-num.fond-pistache { background: var(--pistache); }
.astuce-num.fond-radis { background: var(--radis-clair); }
.astuce-num.fond-sapin { background: var(--sapin); color: var(--blanc); }
.astuce-fiche .astuce-exemple { margin: auto -20px 0; padding: 12px 20px; border-top: 1.5px dashed var(--encre); background: var(--papier); color: var(--gris); font-size: 14px; }
.astuce-fiche .astuce-exemple::before { content: "En pratique"; display: block; margin-bottom: 2px; color: var(--encre); font-family: var(--titres); font-weight: 800; font-size: 13.5px; }
.astuces-note { margin-top: 30px; padding: 14px 0 0; }
.entete-illu.fond-marmite { background-color: var(--citron); }

.titre-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.titre-section h2 { margin: 0; font-size: 24px; }
.titre-section a { font-weight: 700; font-size: 15px; }

/* Explication du calcul, repliée dans un volet */
details.calcul { margin-top: 26px; box-shadow: var(--ombre-petite); }

/* ---------- Explication IG / CG ---------- */
details.explication { margin-top: 26px; box-shadow: var(--ombre-petite); }
details.explication + details.calcul { margin-top: 14px; }
.explication-grille { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -22px; border-top: var(--trait); background: var(--blanc); }
.explication-bloc { padding: 18px 22px 20px; }
.explication-bloc + .explication-bloc { border-left: var(--trait); }
.explication-bloc h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-family: var(--titres); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.explication-sigle { display: inline-grid; place-items: center; min-width: 44px; height: 34px; padding: 0 8px; border: var(--trait); border-radius: 9px;
	background: var(--citron); font-size: 17px; }
.explication-bloc + .explication-bloc .explication-sigle { background: var(--pistache); }
.explication-bloc p { margin: 0 0 10px; font-size: 15px; }
.explication-echelle { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.explication-echelle .pastille { min-width: 56px; justify-content: center; margin-right: 6px; }
.explication-exemple { color: var(--gris); font-size: 14px !important; margin-bottom: 0 !important; }
.formule { display: inline-block; margin-top: 6px; padding: 3px 9px; border: 1.5px solid var(--encre); border-radius: 7px; background: var(--papier);
	font-weight: 700; font-size: 14px; }
.explication-pied { margin: 0 -22px -8px; padding: 14px 22px; border-top: var(--trait); font-size: 14px; color: var(--gris); }
.explication-pied strong { color: var(--encre); }
.calcul .etapes-calcul { margin: 0 -22px; border: 0; border-top: var(--trait); border-radius: 0; box-shadow: none; }
.calcul .etapes-calcul li { padding: 16px 20px; }
.calcul .etapes-calcul li::before { font-size: 30px; margin-bottom: 6px; }
.calcul .etapes-calcul strong { font-size: 17px; }
.calcul .etapes-calcul p { font-size: 14px; }
.calcul .note-ia { margin: 0 -22px -8px; border-radius: 0; font-size: 14px; }
.hero-faits { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 14.5px; font-weight: 650; }
.hero-faits li { display: inline-flex; align-items: center; gap: 8px; }
.hero-faits li::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--encre); border-radius: 3px; background: var(--radis); transform: rotate(45deg); }

.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.tuile { display: flex; flex-direction: column; background: var(--blanc); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
	color: var(--encre); text-decoration: none; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.tuile:hover { transform: translate(-3px, -3px); box-shadow: 8px 8px 0 var(--encre); color: var(--encre); }
.tuile:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--encre); }
.tuile .tuile-illu { display: block; padding: 10px 28px; border-bottom: var(--trait); background: var(--citron) radial-gradient(rgba(18, 18, 18, .12) 1px, transparent 1.4px) 0 0 / 14px 14px; }
.tuile:nth-child(2) .tuile-illu { background-color: var(--pistache); }
.tuile:nth-child(3) .tuile-illu { background-color: var(--radis-clair); }
.tuile .tuile-illu .illu { width: 100%; height: 132px; display: block; }
.tuile strong { display: block; padding: 18px 20px 4px; font-family: var(--titres); font-weight: 800; letter-spacing: -.03em; font-size: 23px; line-height: 1.1; }
.tuile .tuile-texte { display: block; padding: 0 20px; color: var(--gris); font-size: 15px; }
.tuile .tuile-lien { margin-top: auto; padding: 16px 20px 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.tuile .tuile-lien .icone { width: 20px; height: 20px; transition: transform .12s; }
.tuile:hover .tuile-lien .icone { transform: translateX(5px); }

/* Comment le calcul est fait : bandeau en trois colonnes */
.etapes-calcul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--blanc);
	border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; counter-reset: etape; }
.etapes-calcul li { padding: 22px 24px 24px; counter-increment: etape; border-right: var(--trait); }
.etapes-calcul li:last-child { border-right: 0; }
.etapes-calcul li::before { content: "0" counter(etape); display: block; font-family: var(--titres); font-weight: 800; font-size: 44px; line-height: 1;
	letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--encre); margin-bottom: 12px; }
.etapes-calcul strong { display: block; font-family: var(--titres); font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin-bottom: 6px; }
.etapes-calcul p { margin: 0; color: var(--gris); font-size: 15px; }
.note-ia { margin: 18px 0 0; padding: 14px 18px; background: var(--encre); color: var(--blanc); border-radius: var(--rayon-petit); font-size: 15px; }
.note-ia strong { color: var(--pistache); }

/* ---------- Cartes ---------- */
.carte { background: var(--blanc); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 22px; overflow: hidden; }
.carte-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 15px 20px; border-bottom: var(--trait); }
.carte-entete h3 { font-size: 21px; }
.carte-chiffres { color: var(--gris); font-size: 14px; margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.carte-corps { padding: 22px; }
.carte-corps > :first-child { margin-top: 0; }
.carte-corps > :last-child { margin-bottom: 0; }
.description { white-space: pre-line; }
.carte-etroite { max-width: 480px; margin: 12px auto 32px; }
.carte-etroite .illu-haut { padding: 18px 60px 8px; border-bottom: var(--trait); background: var(--pistache) radial-gradient(rgba(18, 18, 18, .12) 1px, transparent 1.4px) 0 0 / 14px 14px; }
.carte-etroite .illu-haut .illu { width: 100%; max-height: 150px; display: block; }
.carte-etroite h1 { font-size: 34px; }

details.depliable { padding: 0 22px 8px; }
details > summary { cursor: pointer; font-weight: 750; padding: 15px 0; list-style: none; display: flex; align-items: center; gap: 12px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: var(--trait); border-radius: 8px;
	font: 800 17px/1 var(--texte); background: var(--pistache); }
details[open] > summary::before { content: "−"; background: var(--blanc); }

/* ---------- Formulaires ---------- */
.formulaire label { display: block; font-weight: 700; font-size: 15px; margin: 18px 0 7px; }
.formulaire label:first-of-type { margin-top: 0; }
.formulaire label small { font-weight: 400; color: var(--gris); }
.formulaire input[type=text], .formulaire input[type=email], .formulaire input[type=number], .formulaire input[type=password], .formulaire select, .formulaire textarea {
	width: 100%; min-height: 50px; padding: 11px 14px; border: var(--trait); border-radius: var(--rayon-petit); font: inherit; font-size: 16px;
	background: var(--blanc); color: var(--encre); transition: box-shadow .12s; }
.formulaire input::placeholder, .formulaire textarea::placeholder { color: #8A8C83; }
.formulaire select { -webkit-appearance: none; appearance: none; padding-right: 44px;
	background: var(--blanc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center / 18px; }
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--pistache), 4px 4px 0 2px var(--encre); }
.formulaire textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.formulaire textarea.court { min-height: 90px; }
.formulaire .ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
.formulaire .ligne label { margin-top: 18px; }
.champ-groupe { display: flex; gap: 10px; }
.champ-groupe input { flex: 1; min-width: 0; }
.aide-formulaire { margin: 16px 0 0; color: var(--gris); font-size: 14px; }
.aide-formulaire.petit { font-size: 13px; }
.formulaire label.case { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-top: 20px; cursor: pointer; }
.formulaire label.case input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--sapin); }

/* ---------- Boutons ---------- */
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; align-items: center; }
.boutons form { margin: 0; }
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 10px 22px; border: var(--trait);
	border-radius: var(--rayon-petit); background: var(--encre); color: var(--blanc); font: inherit; font-weight: 750; font-size: 16px; line-height: 1.2;
	text-decoration: none; text-align: center; cursor: pointer; box-shadow: var(--ombre-petite); transition: transform .1s, box-shadow .1s, background .12s; }
.bouton:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--encre); color: var(--blanc); }
.bouton:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--encre); }
.bouton.accent { background: var(--pistache); color: var(--encre); }
.bouton.accent:hover { color: var(--encre); }
.bouton.secondaire { background: var(--blanc); color: var(--encre); }
.bouton.secondaire:hover { color: var(--encre); }
.bouton.danger { background: var(--blanc); color: #B0102E; }
.bouton.danger:hover { background: var(--radis-clair); color: #B0102E; }
.bouton.petit { min-height: 40px; padding: 6px 15px; font-size: 14.5px; }
.bouton.grand { min-height: 56px; padding: 12px 28px; font-size: 17px; }
.bouton[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--ombre-petite); }
.bouton .icone { width: 20px; height: 20px; }

/* ---------- Onglets (analyser : texte ou photo) ---------- */
.onglets { display: inline-flex; gap: 4px; padding: 4px; background: var(--blanc); border: var(--trait); border-radius: 14px; margin: 0 0 18px; max-width: 100%; }
.onglets [role=tab] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; background: transparent;
	padding: 8px 18px; border-radius: 10px; font: inherit; font-weight: 750; font-size: 15px; color: var(--encre); cursor: pointer; }
.onglets [role=tab] .icone { width: 20px; height: 20px; }
.onglets [role=tab][aria-selected=true] { background: var(--encre); color: var(--blanc); }

/* ---------- Photo ---------- */
.zone-photo { border: 2px dashed var(--encre); border-radius: var(--rayon); min-height: 220px; display: grid; place-items: center; overflow: hidden; text-align: center;
	background: var(--papier) radial-gradient(rgba(18, 18, 18, .1) 1px, transparent 1.4px) 0 0 / 14px 14px; }
.zone-vide { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 20px; color: var(--gris); font-size: 15px; max-width: 30em; }
.zone-icone { width: 70px; height: 70px; border-radius: 18px; background: var(--citron); border: var(--trait); box-shadow: var(--ombre-petite); color: var(--encre);
	display: grid; place-items: center; margin-bottom: 12px; transform: rotate(-6deg); }
.zone-icone .icone { width: 34px; height: 34px; }
.zone-vide strong { color: var(--encre); font-family: var(--titres); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.apercu { display: block; width: 100%; max-height: 440px; object-fit: contain; background: var(--encre); }
.boutons-photo label.bouton { position: relative; overflow: hidden; margin: 0; font-size: 16px; font-weight: 750; }
.boutons-photo input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.boutons-photo label.bouton:focus-within { outline: 3px solid var(--radis); outline-offset: 2px; }
.photo-message { margin-top: 12px; }
.formulaire.form-photo > label { margin-top: 22px; }
.formulaire label.bouton { display: inline-flex; margin: 0; }
@media (hover: hover) and (pointer: fine) { .seul-tactile { display: none !important; } }

/* ---------- Carte de restaurant : choix des plats ---------- */
.rubrique { font-size: 22px; margin: 28px 0 12px; }
.choix-carte { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.formulaire .choix-carte label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 0; padding: 14px 16px;
	background: var(--blanc); border: var(--trait); border-radius: 14px; cursor: pointer; font-weight: 400; transition: transform .1s, box-shadow .1s, background .12s; }
.formulaire .choix-carte label:hover { transform: translate(-2px, -2px); box-shadow: var(--ombre-petite); }
.formulaire .choix-carte label:has(input:checked) { background: var(--pistache-clair); box-shadow: var(--ombre-petite); }
.choix-carte input[type=checkbox] { width: 24px; height: 24px; margin: 0; accent-color: var(--encre); }
.cc-nom { font-weight: 750; min-width: 0; }
.cc-nom small { display: block; font-weight: 400; color: var(--gris); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-chiffres { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cc-chiffres small { color: var(--gris); font-size: 12.5px; }
.barre-action { position: sticky; bottom: 16px; z-index: 5; padding: 12px; background: var(--blanc); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }

/* ---------- Résultats ---------- */
.resume { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.chiffre { background: var(--blanc); border: var(--trait); border-radius: var(--rayon); padding: 16px 18px; }
.chiffre .libelle { display: block; color: var(--gris); font-size: 13.5px; font-weight: 700; }
.chiffre strong { display: block; font-family: var(--titres); font-weight: 800; letter-spacing: -.05em; font-size: 42px; line-height: 1; margin: 6px 0 10px; }
.chiffre .detail { font-size: 13px; color: var(--gris); }
.chiffre.vedette { box-shadow: var(--ombre); }
.chiffre.vedette strong { font-size: 64px; }
.chiffre.vedette.bas { background: var(--pistache-clair); }
.chiffre.vedette.moyen { background: var(--citron-clair); }
.chiffre.vedette.eleve { background: var(--radis-clair); }

.jauge { position: relative; display: flex; height: 14px; margin: 16px 0 6px; border: var(--trait); border-radius: 999px; overflow: visible;
	background: linear-gradient(90deg, var(--ig-bas) 0 55%, var(--ig-moyen) 55% 70%, var(--ig-eleve) 70% 100%); }
.jauge-repere { position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%; background: var(--blanc); border: 3px solid var(--encre);
	transform: translate(-50%, -50%); }
.jauge-echelle { position: relative; height: 16px; font-size: 11.5px; font-weight: 650; color: var(--gris); }
.jauge-echelle span { position: absolute; transform: translateX(-50%); }
.jauge-echelle span:first-child { left: 0; transform: none; }
.jauge-echelle span:last-child { right: 0; transform: none; }

.pastille { display: inline-flex; align-items: center; padding: 1px 9px; border: 1.5px solid var(--encre); border-radius: 7px; font-family: var(--texte);
	font-size: 13px; font-weight: 750; letter-spacing: 0; white-space: nowrap; color: var(--encre); }
.pastille.bas { background: var(--ig-bas); }
.pastille.moyen { background: var(--ig-moyen); }
.pastille.eleve { background: var(--ig-eleve); }
.pastille.inconnu { background: #E6E7E0; }

.tableau { width: 100%; border-collapse: collapse; font-size: 15px; }
.tableau th { text-align: left; font-size: 13px; font-weight: 750; padding: 10px 16px; background: var(--papier); border-bottom: var(--trait); }
.tableau td { padding: 11px 16px; border-bottom: 1px solid var(--ligne-douce); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .nb { text-align: right; white-space: nowrap; }
.tableau tr.manquant td { background: var(--citron-clair); }
.tableau.saisie { margin: 10px 0 6px; border: var(--trait); border-radius: var(--rayon-petit); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.tableau.saisie td { padding: 8px 10px; }
.tableau .col-grammes { width: 120px; }
.defile { overflow-x: auto; }

.remplacements { list-style: none; margin: 0; padding: 6px 22px; }
.remplacements li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 13px 0; border-bottom: 1px solid var(--ligne-douce); }
.remplacements li:last-child { border-bottom: 0; }
.remplacements .dans { color: var(--gris); font-size: 14px; }
.remplacements .par { flex-basis: 100%; display: inline-flex; align-items: flex-start; gap: 6px; font-weight: 650; color: var(--sapin); }
.remplacements .par .icone { width: 18px; height: 18px; flex: none; margin-top: 3px; }

/* ---------- Recettes ---------- */
.plat-recette { padding: 22px 0; border-top: var(--trait); }
.plat-recette:first-of-type { border-top: 0; padding-top: 4px; }
.plat-titre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 24px; margin-bottom: 14px; }
.recette-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.recette-meta .meta { border: 1.5px solid var(--encre); border-radius: 9px; padding: 4px 12px; font-size: 14px; background: var(--blanc); }
.portions { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; background: var(--pistache); border: var(--trait); border-radius: 12px; padding: 3px; font-size: 14.5px; font-weight: 750; }
.portions > span { padding: 0 8px; white-space: nowrap; }
.portions button { width: 36px; height: 36px; border-radius: 9px; border: 2px solid var(--encre); background: var(--blanc); color: var(--encre); font: inherit; font-size: 20px;
	font-weight: 800; line-height: 1; cursor: pointer; }
.portions button:hover { background: var(--encre); color: var(--blanc); }
.recette-grille { display: grid; grid-template-columns: minmax(220px, 2fr) 3fr; gap: 22px 36px; }
.recette h4 { font-size: 18px; }
.recette h4 small { font-family: var(--texte); font-weight: 400; font-size: 13px; color: var(--gris); letter-spacing: 0; }
.ingredients { list-style: none; margin: 0 0 18px; padding: 0; }
.ingredients li { padding: 8px 0; border-bottom: 1px dashed var(--ligne-douce); font-size: 15.5px; }
.ingredients li:last-child { border-bottom: 0; }
.ingredients .qte { display: inline-block; min-width: 68px; font-weight: 800; color: var(--sapin); font-variant-numeric: tabular-nums; }
.ingredients.assaisonnement li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border: 1.5px solid var(--encre);
	background: var(--citron); transform: rotate(45deg); }
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes li { position: relative; padding: 2px 0 16px 48px; counter-increment: etape; font-size: 15.5px; }
.etapes li::before { content: counter(etape); position: absolute; left: 0; top: -1px; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
	background: var(--encre); color: var(--blanc); font-family: var(--titres); font-weight: 800; font-size: 16px; }
.etapes li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 2px; border-left: 2px dotted var(--encre); }
.astuce { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 8px 0 0; padding: 13px 16px; background: var(--citron); border: var(--trait); border-radius: var(--rayon-petit); font-size: 15px; }
.astuce strong { font-family: var(--titres); font-weight: 800; }

/* Ordre dans lequel manger les aliments : encart du repas et ligne « Dans l'assiette » des recettes */
.ordre-etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: ordre; }
.ordre-etapes li { position: relative; padding: 16px 18px 18px 64px; counter-increment: ordre; border-right: var(--trait); }
.ordre-etapes li:last-child { border-right: 0; }
.ordre-etapes li::before { content: counter(ordre); position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center;
	border: var(--trait); border-radius: 10px; font-family: var(--titres); font-weight: 800; font-size: 18px; background: var(--blanc); }
.ordre-etapes .ordre-1::before { background: var(--pistache); }
.ordre-etapes .ordre-2::before { background: var(--pistache-clair); }
.ordre-etapes .ordre-3::before { background: var(--citron); }
.ordre-etapes .ordre-4::before { background: var(--radis-clair); }
.ordre-etapes strong { display: block; font-family: var(--titres); font-weight: 800; font-size: 16.5px; margin-bottom: 4px; }
.ordre-aliments { display: block; font-size: 15px; }
.ordre-conseil { display: block; margin-top: 6px; color: var(--gris); font-size: 13.5px; }
.ordre-note { margin: 0; padding: 12px 18px; border-top: var(--trait); color: var(--gris); font-size: 13.5px; }
.ordre-assiette { margin: 8px 0 0; padding: 12px 16px; background: var(--pistache-clair); border: var(--trait); border-radius: var(--rayon-petit); font-size: 15px; }
.ordre-assiette strong { font-family: var(--titres); font-weight: 800; margin-right: 6px; }
@media (max-width: 640px) {
	.ordre-etapes { grid-template-columns: 1fr; }
	.ordre-etapes li { border-right: 0; border-bottom: var(--trait); }
	.ordre-etapes li:last-child { border-bottom: 0; }
}
.carte.plat .recette { padding-bottom: 4px; }

/* ---------- Liste de menus ---------- */
.liste-menus { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.liste-menus a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 14px 18px; background: var(--blanc);
	border: var(--trait); border-radius: 16px; color: var(--encre); text-decoration: none; transition: transform .1s, box-shadow .1s; }
.liste-menus a:hover { transform: translate(-2px, -2px); box-shadow: var(--ombre-petite); }
.lm-icone { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: var(--trait); }
.lm-icone.analyse { background: var(--pistache); }
.lm-icone.creation { background: var(--citron); }
.lm-icone .icone { width: 22px; height: 22px; }
.lm-texte { min-width: 0; }
.lm-texte strong { display: block; font-family: var(--titres); font-weight: 800; letter-spacing: -.02em; font-size: 18.5px; line-height: 1.2; }
.lm-texte small { color: var(--gris); font-size: 13.5px; }
.lm-chiffres { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.vide { text-align: center; padding: 30px 22px; }
.vide .illu { width: 190px; height: auto; }
.vide p { color: var(--gris); margin: 8px auto 0; max-width: 32em; }

/* ---------- Messages (pastille + encadré au trait, sans barre latérale) ---------- */
.alerte, .erreur, .message { position: relative; margin: 0 0 20px; padding: 13px 18px 13px 54px; background: var(--blanc); border: var(--trait);
	border-radius: 14px; font-size: 15px; line-height: 1.5; }
.alerte::before, .erreur::before, .message::before { position: absolute; left: 14px; top: 11px; width: 26px; height: 26px; border: var(--trait); border-radius: 8px;
	display: grid; place-items: center; font: 800 15px/1 var(--texte); color: var(--encre); }
.message { box-shadow: 3px 3px 0 var(--pistache), 3px 3px 0 2px var(--encre); }
.message::before { content: "✓"; background: var(--pistache); }
.alerte::before { content: "!"; background: var(--citron); }
.erreur { box-shadow: 3px 3px 0 var(--radis), 3px 3px 0 2px var(--encre); }
.erreur::before { content: "×"; background: var(--radis); font-size: 18px; }

.invitation { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 20px; margin: 0 0 22px; padding: 20px 24px;
	background: var(--citron); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }
.invitation p { margin: 0; font-size: 16px; font-weight: 550; }
.invitation .boutons { margin-top: 14px; }
.invitation-illu { background: var(--blanc); border: var(--trait); border-radius: 14px; padding: 6px; transform: rotate(-3deg); }
.invitation-illu .illu { width: 100%; height: auto; display: block; }

/* ---------- Animation d'attente (appels à l'IA) ---------- */
.attente { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(18, 18, 18, .55); animation: apparition .2s ease-out; }
.attente-carte { width: min(450px, 100%); max-height: 100%; overflow: auto; background: var(--blanc); border: 2.5px solid var(--encre); border-radius: 26px;
	padding: 22px 24px; box-shadow: 8px 8px 0 var(--encre); }
.attente-illu { border: var(--trait); border-radius: 18px; padding: 8px 70px 0; margin-bottom: 16px;
	background: var(--citron) radial-gradient(rgba(18, 18, 18, .12) 1px, transparent 1.4px) 0 0 / 14px 14px; }
.attente-illu .illu { width: 100%; height: auto; display: block; }
.attente h2 { margin: 0 0 14px; font-size: 26px; text-align: center; }
.etapes-attente { list-style: none; margin: 0; padding: 0; }
.etapes-attente li { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: #9A9C93; font-size: 15.5px; transition: color .3s; }
.etapes-attente .puce { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #C5C7BE; display: grid; place-items: center; transition: all .25s; }
.etapes-attente li.en-cours { color: var(--encre); font-weight: 750; }
.etapes-attente li.en-cours .puce { border: 3px solid var(--ligne-douce); border-top-color: var(--encre); border-radius: 50%; animation: tourne .8s linear infinite; }
.etapes-attente li.fait { color: var(--encre); }
.etapes-attente li.fait .puce { background: var(--pistache); border-color: var(--encre); }
.etapes-attente li.fait .puce::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--encre); border-bottom: 2.5px solid var(--encre); transform: rotate(-45deg) translate(1px, -1px); }
.attente-note { margin: 16px 0 0; text-align: center; color: var(--gris); font-size: 14px; }
.chrono { font-family: var(--titres); font-variant-numeric: tabular-nums; font-weight: 800; color: var(--encre); }
body.attente-active { overflow: hidden; }

.vapeur { animation: vapeur 2.4s ease-in-out infinite; opacity: 0; }
.vapeur.v2 { animation-delay: .8s; }
.vapeur.v3 { animation-delay: 1.6s; }
.flammes { animation: flamme 1.2s ease-in-out infinite alternate; transform-origin: 100px 172px; }
@keyframes vapeur { 0% { opacity: 0; transform: translateY(10px); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateY(-12px); } }
@keyframes flamme { from { transform: scaleY(.9); } to { transform: scaleY(1.08); } }
@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes apparition { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tablette ---------- */
@media (max-width: 980px) {
	.barre { gap: 10px 16px; padding: 12px 18px; }
	.nav-principale a { padding: 7px 10px; }
	.nav-principale a .icone { display: none; }
	.compte-entete .qui .nom { display: none; }
	.resume { grid-template-columns: 1fr 1fr; }
	.resume .vedette { grid-column: 1 / -1; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 760px) {
	body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
	.barre { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
	.marque { font-size: 21px; }
	.marque .logo { width: 32px; height: 32px; }
	.nav-principale { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around; gap: 4px;
		padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: var(--blanc); border-top: var(--trait); }
	.nav-principale a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px 5px; border-radius: 12px; font-size: 11.5px; font-weight: 700; min-width: 0; text-align: center; }
	.nav-principale a .icone { display: block; width: 24px; height: 24px; }
	.nav-principale a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.mobile-seul { display: flex !important; }
	.bureau-seul { display: none !important; }

	.page { padding: 20px 16px 36px; }
	.pied-int { padding: 22px 16px 26px; flex-direction: column; }
	h2 { margin-top: 36px; }

	.entete-page.avec-illu { grid-template-columns: 1fr 108px; gap: 4px 14px; }
	.entete-page h1 { font-size: 32px; }
	.entete-illu { padding: 4px 6px; border-radius: 14px; }
	.sous-titre { font-size: 15.5px; }

	.hero { grid-template-columns: 1fr; border-radius: 22px; box-shadow: 5px 5px 0 var(--encre); margin-bottom: 18px; }
	.hero-illu { order: -1; border-left: 0; border-bottom: 2.5px solid var(--encre); padding: 8px 20px; }
	.hero-illu .illu { max-width: 170px; }
	.hero-texte { padding: 18px 18px 20px; }
	.hero h1 { font-size: 31px; }
	.hero .accroche { font-size: 15.5px; margin-bottom: 16px; }
	.hero .boutons { gap: 10px; }

	.raccourcis { grid-template-columns: 1fr; gap: 10px; }
	.raccourci { grid-template-columns: 64px 1fr auto; min-height: 64px; gap: 12px; }
	.titre-section { margin-top: 24px; }
	.raccourci-astuces { margin-top: 10px; }
	.astuces-liste { grid-template-columns: 1fr; gap: 12px; }
	.astuce-fiche { padding: 16px 16px 0; }
	.astuce-fiche .astuce-exemple { margin: auto -16px 0; padding: 12px 16px; }
	.astuces-rubrique h2 { margin-top: 30px; }
	.astuces-rubrique { scroll-margin-top: 70px; }
	.calcul .etapes-calcul, .calcul .note-ia { margin-left: -16px; margin-right: -16px; }
	.explication-grille, .explication-pied { margin-left: -16px; margin-right: -16px; }
	.explication-grille { grid-template-columns: 1fr; }
	.explication-bloc { padding: 16px; }
	.explication-bloc + .explication-bloc { border-left: 0; border-top: var(--trait); }
	.explication-pied { padding: 14px 16px; }
	.calcul .etapes-calcul li { padding: 14px 16px; }

	.etapes-calcul { grid-template-columns: 1fr; }
	.etapes-calcul li { border-right: 0; border-bottom: var(--trait); }
	.etapes-calcul li:last-child { border-bottom: 0; }

	.carte { box-shadow: 4px 4px 0 var(--encre); }
	.carte-entete { padding: 13px 16px; }
	.carte-corps { padding: 18px 16px; }
	details.depliable { padding: 0 16px 6px; }
	.carte-chiffres { margin-left: 0; width: 100%; }

	.boutons { flex-direction: column; align-items: stretch; }
	.boutons .bouton, .boutons form, .boutons form .bouton { width: 100%; }

	.onglets { display: flex; width: 100%; }
	.onglets [role=tab] { flex: 1; padding: 8px 6px; font-size: 14.5px; }
	.zone-photo { min-height: 180px; }
	.barre-action { bottom: calc(84px + env(safe-area-inset-bottom)); }

	.resume { grid-template-columns: repeat(3, 1fr); gap: 10px; }
	.chiffre { padding: 12px 12px; border-radius: 14px; }
	.chiffre .libelle { font-size: 12.5px; line-height: 1.25; min-height: 2.5em; }
	.chiffre strong { font-size: 26px; margin-bottom: 6px; }
	.chiffre .detail { display: none; }
	.chiffre .pastille { font-size: 12px; padding: 0 6px; }
	.chiffre.vedette { padding: 16px 18px; }
	.chiffre.vedette .libelle { min-height: 0; }
	.chiffre.vedette strong { font-size: 56px; }

	/* Tableaux en fiches : une fiche par ligne, libellé à gauche, valeur à droite */
	.tableau.empile thead { display: none; }
	.tableau.empile, .tableau.empile tbody, .tableau.empile tr, .tableau.empile td { display: block; width: 100%; }
	.tableau.empile tr { padding: 12px 16px; border-bottom: 1px solid var(--ligne-douce); }
	.tableau.empile tr:last-child { border-bottom: 0; }
	.tableau.empile td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; border: 0; text-align: right; white-space: normal; }
	.tableau.empile td::before { content: attr(data-label); color: var(--gris); font-size: 13px; font-weight: 650; text-align: left; flex: none; max-width: 45%; }
	.tableau.empile td.titre-ligne { display: block; text-align: left; font-weight: 800; font-size: 16.5px; padding-bottom: 4px; }
	.tableau.empile td.titre-ligne::before { content: none; }
	.tableau.empile tr.manquant { background: var(--citron-clair); }
	.tableau.empile tr.manquant td { background: none; }
	.tableau.empile.saisie { border: 0; }
	.tableau.empile.saisie tr { padding: 12px 0; }
	.tableau.empile.saisie td { display: block; text-align: left; padding: 4px 0; }
	.tableau.empile.saisie td::before { display: block; max-width: none; margin-bottom: 4px; }
	.tableau .col-grammes { width: 100%; }

	.recette-grille { grid-template-columns: 1fr; gap: 8px; }
	.portions { margin-left: 0; }
	.plat-titre { font-size: 22px; }

	.liste-menus a { grid-template-columns: auto 1fr; gap: 10px 12px; padding: 12px 14px; }
	.lm-chiffres { grid-column: 2; justify-content: flex-start; }

	.invitation { grid-template-columns: 1fr; gap: 14px; padding: 18px 16px; box-shadow: 4px 4px 0 var(--encre); }
	.invitation-illu { width: 96px; }

	.attente { align-items: end; padding: 0; }
	.attente-carte { width: 100%; border-radius: 26px 26px 0 0; border-bottom: 0; box-shadow: none; padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); }
	.attente-illu { padding: 4px 80px 0; }
}

@media (max-width: 380px) {
	.compte-entete .bouton.petit { padding: 6px 11px; font-size: 13.5px; }
	.chiffre strong { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
	.vapeur { opacity: .8; }
}
