/* Page « Analyser une liste d'ingrédients » (analyser-liste.html) */
.al-page { width: 100%; max-width: 500px; margin: 0 auto 1rem; }
.al-entete { text-align: center; margin-bottom: 1rem; }
.al-entete h1 { font-size: 1.45rem; color: var(--primary-dark, #146b39); margin: 0 0 .5rem; line-height: 1.25; }
.al-entete p { font-size: .95rem; color: #495057; line-height: 1.5; margin: 0; }

.al-onglets { display: flex; gap: .4rem; margin: 0 0 .8rem; background: #eef1f3; padding: .3rem; border-radius: 12px; }
.al-onglets button { flex: 1; border: 0; background: transparent; padding: .65rem; border-radius: 9px; font-weight: 700;
    font-size: .95rem; color: #495057; cursor: pointer; }
.al-onglets button[aria-selected="true"] { background: #fff; color: var(--primary-dark, #146b39); box-shadow: 0 2px 6px rgba(0,0,0,.08); }

.al-carte { background: #fff; border: 1px solid #e9ecef; border-radius: 14px; padding: 1rem; box-shadow: 0 4px 12px rgba(0,0,0,.04); }
.al-carte[hidden] { display: none; }
.al-btn { display: flex; align-items: center; justify-content: center; gap: .4rem; width: 100%; padding: .9rem 1rem; border-radius: 10px;
    font-weight: 800; font-size: 1rem; cursor: pointer; border: 0; text-align: center; }
.al-btn-principal { background: var(--primary-color, #1e8f4e); color: #fff; box-shadow: 0 4px 10px rgba(30,143,78,.25); }
.al-btn-principal:disabled { background: #adb5bd; box-shadow: none; cursor: wait; }
.al-btn-petit { background: #f1f3f5; border: 1px solid #dee2e6; color: #343a40; border-radius: 8px; padding: .35rem .65rem;
    font-weight: 700; font-size: .9rem; cursor: pointer; margin-left: .25rem; }
.al-aide { font-size: .85rem; color: #6c757d; margin: .6rem 0; line-height: 1.45; }
.al-note { font-size: .78rem; color: #868e96; margin: .8rem 0 0; line-height: 1.4; }
.al-label { display: block; font-weight: 700; font-size: .9rem; margin: .2rem 0 .35rem; color: #343a40; }
.al-label small { font-weight: 400; color: #868e96; }
#al-nom, #al-texte { width: 100%; box-sizing: border-box; border: 1px solid #ced4da; border-radius: 10px; padding: .7rem .8rem;
    font: inherit; font-size: 1rem; margin-bottom: .8rem; background: #fff; color: #212529; }
#al-texte { resize: vertical; min-height: 9rem; line-height: 1.45; }
#al-nom:focus, #al-texte:focus { outline: 2px solid var(--primary-color, #1e8f4e); outline-offset: 1px; border-color: transparent; }

.al-rotation { display: flex; justify-content: space-between; align-items: center; margin: .9rem 0 .5rem; font-size: .85rem; color: #6c757d; }
.al-vue { position: relative; width: 100%; background: #000; border-radius: 10px; overflow: hidden; touch-action: none; user-select: none; }
#al-apercu { display: block; width: 100%; height: auto; pointer-events: none; }
#al-cadre { position: absolute; left: 10%; top: 30%; width: 80%; height: 25%; border: 2px solid #38d27a; border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.6); cursor: move; touch-action: none; }
#al-poignee { position: absolute; right: -2px; bottom: -2px; width: 36px; height: 36px; background: #38d27a; border-top-left-radius: 10px;
    cursor: nwse-resize; touch-action: none; display: flex; align-items: center; justify-content: center; }
#al-poignee::after { content: "⤡"; font-size: 18px; font-weight: 900; color: #0b2e17; }

.al-statut { min-height: 1.2rem; text-align: center; font-size: .9rem; color: #495057; margin: .8rem 0; }
.al-statut.erreur { background: #fff3f3; border: 1px solid #f5c2c7; color: #842029; border-radius: 10px; padding: .7rem .9rem; text-align: left; }
.al-statut.attente::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: .5rem; vertical-align: -2px;
    border: 2px solid #ced4da; border-top-color: var(--primary-color, #1e8f4e); border-radius: 50%; animation: al-tourne .8s linear infinite; }
@keyframes al-tourne { to { transform: rotate(360deg); } }
/* Défilement automatique vers la photo ou le résultat : sous la barre du haut, pas derrière */
#al-cadrage, #result-ui, #panneau-texte { scroll-margin-top: calc(var(--bar-height, 80px) + env(safe-area-inset-top) + .75rem); }
