/* Outils QHSE gratuits : styles des pages /outils/. Complète theme.css.
   Langage visuel du thème : navy #1a1a2e/#16213e, vert #4CAF50, Inter + Archivo. */

/* ---- Layout deux panneaux ---- */
.outil-layout { display: grid; grid-template-columns: 1fr 400px; gap: 28px;
    align-items: start; margin-top: 40px; text-align: left; }
@media (max-width: 900px) { .outil-layout { grid-template-columns: 1fr; } }

/* ---- Panneau paramètres (carte claire) ---- */
.outil-panneau-form { background: #fff; border: 1px solid #E3E9ED; border-radius: 16px;
    padding: 28px; box-shadow: 0 10px 30px rgba(22, 33, 62, 0.06); }

.outil-fieldset { border: none; padding: 0; margin: 0 0 24px; }
.outil-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #5A6B75; margin-bottom: 10px; }

.outil-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.outil-seg-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .outil-seg-3 { grid-template-columns: 1fr 1fr; } }
.outil-seg label { position: relative; cursor: pointer; margin: 0; }
.outil-seg input { position: absolute; opacity: 0; pointer-events: none; }
.outil-seg span { display: flex; align-items: center; justify-content: center;
    text-align: center; min-height: 52px; padding: 10px 12px; border: 2px solid #E3E9ED;
    border-radius: 10px; font-weight: 600; font-size: 14.5px; line-height: 1.25;
    color: #3B4A54; background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease; }
.outil-seg label:hover span { border-color: #B9C6CE; }
.outil-seg label:has(input:checked) span { border-color: #4CAF50; background: #EAF6EB; color: #1B5E20; }
.outil-seg input:focus-visible + span { outline: 3px solid rgba(76, 175, 80, 0.4); outline-offset: 2px; }

.outil-champ { margin: 0 0 20px; }
.outil-champ label { display: block; margin: 0; }
.outil-input { position: relative; display: flex; align-items: center; }
.outil-input input { width: 100%; padding: 13px 64px 13px 14px; border: 2px solid #E3E9ED;
    border-radius: 10px; font-size: 16px; font-weight: 600; color: #16213E;
    background: #FBFCFD; transition: border-color 0.15s ease;
    appearance: textfield; -moz-appearance: textfield; }
.outil-input input::-webkit-outer-spin-button,
.outil-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.outil-input input:focus { outline: none; border-color: #4CAF50; background: #fff; }
.outil-unite { position: absolute; right: 14px; font-size: 13px; font-weight: 600;
    color: #8A99A3; pointer-events: none; }
.outil-input select { width: 100%; padding: 13px 14px; border: 2px solid #E3E9ED;
    border-radius: 10px; font-size: 15px; font-weight: 600; color: #16213E;
    background: #FBFCFD; transition: border-color 0.15s ease; }
.outil-input select:focus { outline: none; border-color: #4CAF50; background: #fff; }
.outil-aide { display: block; margin-top: 8px; font-size: 12.5px; line-height: 1.5;
    color: #8A99A3; }

/* ---- Panneau résultat (navy sombre, sticky en desktop) ---- */
.outil-panneau-resultat { position: sticky; top: 96px;
    background: linear-gradient(160deg, #1A1A2E 0%, #16213E 100%);
    border-radius: 16px; padding: 26px; color: #fff;
    box-shadow: 0 18px 44px rgba(10, 10, 30, 0.35); }
@media (max-width: 900px) { .outil-panneau-resultat { position: static; } }

.outil-averifier { display: inline-block; background: rgba(255, 183, 77, 0.12);
    border: 1px solid rgba(255, 183, 77, 0.45); color: #FFCC80; border-radius: 999px;
    padding: 4px 12px; font-size: 12px; line-height: 1.4; margin: 0 0 14px; }
.outil-erreur { color: #FF8A80; font-size: 14.5px; margin: 0; }
.outil-attente { color: #C9D4E8; font-size: 14.5px; line-height: 1.6; margin: 0;
    padding: 14px 16px; background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.25); border-radius: 10px; }

.outil-total { display: block; margin: 0 0 16px; }
.outil-total span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #93A1B8; margin-bottom: 6px; }
.outil-total strong { display: block; font-family: 'Archivo', 'Inter', sans-serif;
    font-size: clamp(26px, 2.4vw, 32px); font-weight: 800; line-height: 1.2;
    letter-spacing: -0.01em; color: #fff; }

.outil-lecture { font-size: 13px; line-height: 1.55; color: #93A1B8; margin: -8px 0 16px;
    padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.outil-base { font-size: 12.5px; color: #7E8CA6; margin: 0 0 16px; }

.outil-detail { margin: 0 0 6px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.outil-detail dt { font-size: 13px; color: #93A1B8; margin-top: 12px; }
.outil-detail dd { margin: 2px 0 12px; font-size: 15.5px; font-weight: 700; color: #E8EDF5; }

.outil-postes { margin: 0 0 16px; padding-left: 18px; font-size: 13px; line-height: 1.6;
    color: #7E8CA6; }

.outil-ca { display: block; border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 14px; margin: 0 0 18px; }
.outil-ca span { display: block; font-size: 12.5px; line-height: 1.5; color: #93A1B8;
    margin-bottom: 6px; }
.outil-ca strong { display: block; font-family: 'Archivo', 'Inter', sans-serif;
    font-size: clamp(22px, 2vw, 27px); font-weight: 800; line-height: 1.2; color: #81C784; }

#oca-actions, #tft-actions { display: flex; gap: 10px; margin: 0 0 18px; }
#oca-actions[hidden], #tft-actions[hidden] { display: none; }
#oca-actions button, #tft-actions button { flex: 1; background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28); color: #DCE4F0; border-radius: 999px;
    padding: 9px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease; }
#oca-actions button:hover, #tft-actions button:hover { background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5); }

.outil-cta { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 16px; margin: 0; }
.outil-cta p { font-size: 13.5px; line-height: 1.55; color: #93A1B8; margin: 0 0 12px; }
.outil-cta .btn-primary { width: 100%; justify-content: center; margin-bottom: 10px;
    white-space: nowrap; padding-left: 16px; padding-right: 16px; }
.outil-lien-clair { display: block; text-align: center; font-size: 14px; font-weight: 600;
    color: #9FC5FF; text-decoration: none; }
.outil-lien-clair:hover { color: #C4DBFF; text-decoration: underline; }

.outil-sources { margin: 14px 0 0; font-size: 11px; line-height: 1.5; color: #6B7A94; }

/* ---- Hub /outils/ ---- */
.outils-grille { display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 18px; text-align: left; margin-top: 36px; }
@media (max-width: 700px) { .outils-grille { grid-template-columns: 1fr; } }
.outil-carte { display: block; background: #fff; border: 1px solid #E3E9ED;
    border-radius: 14px; padding: 22px; text-decoration: none;
    box-shadow: 0 2px 10px rgba(22, 33, 62, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease; }
a.outil-carte:hover { box-shadow: 0 10px 28px rgba(22, 33, 62, 0.12);
    transform: translateY(-3px); border-color: #4CAF50; }
.outil-carte-tag { display: inline-block; font-size: 11px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: #4CAF50; }
.outil-carte h2 { margin: 8px 0; font-size: 19px; color: #16213E; }
.outil-carte p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: #5A6B75; }
.outil-carte-action { font-size: 14px; font-weight: 700; color: #2E7D32; }
.outil-carte-avenir { background: #F8FAF9; }
.outil-carte-avenir .outil-carte-tag { color: #8A99A3; }
.outil-carte-avenir h2 { color: #5A6B75; }

/* ---- Impression : résultat seul, sur fond clair ---- */
@media print {
    header, footer, .outil-cta, #oca-actions, #tft-actions, #oca-form, #tft-form, .outil-panneau-form { display: none !important; }
    .outil-layout { display: block; }
    .outil-panneau-resultat { position: static; background: #fff !important; color: #000;
        box-shadow: none; border: 1px solid #ccc; }
    .outil-total strong, .outil-ca strong, .outil-detail dd { color: #000 !important; }
    .outil-total span, .outil-ca span, .outil-detail dt, .outil-postes,
    .outil-sources { color: #333 !important; }
}

@media (prefers-reduced-motion: reduce) {
    .outil-seg span, .outil-input input, .outil-carte, #oca-actions button { transition: none; }
    a.outil-carte:hover { transform: none; }
}
