/* Bouclier : une ligne discrete au-dessus du champ de saisie, et une courte explication.
   Prefixe bcl- partout : aucune regle existante de la page n'est modifiee.
   Zero emoji, zero tiret cadratin. Couleurs de la charte : bleu Klein #002FA7, vert #28A745. */

.bcl-ligne {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 2px 6px;
    padding: 7px 11px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #334155;
    background: #f3f7ff;
    border-radius: 12px;
    animation: bcl-entree 0.28s ease-out both;
}

.bcl-ligne svg {
    flex: none;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    stroke: #002FA7;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bcl-texte {
    margin: 0;
}

.bcl-texte strong {
    font-weight: 700;
    color: #1e293b;
}

.bcl-lien {
    display: inline;
    padding: 0;
    margin: 0 0 0 2px;
    font: inherit;
    font-weight: 600;
    color: #002FA7;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.bcl-lien:hover {
    color: #0041d1;
}

.bcl-lien:focus-visible,
.bcl-fermer:focus-visible,
.bcl-politique:focus-visible {
    outline: 3px solid rgba(0, 47, 167, 0.35);
    outline-offset: 2px;
    border-radius: 6px;
}

@keyframes bcl-entree {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Le clavier du telephone prend la place : la ligne s'efface comme le pied de page. */
body.keyboard-open .bcl-ligne {
    display: none;
}

/* ---------- Explication ---------- */

.bcl-voile {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    animation: bcl-voile 0.2s ease-out both;
}

.bcl-carte {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 24px 22px;
    font-family: 'Inter', system-ui, sans-serif;
    color: #1e293b;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: bcl-carte 0.28s ease-out both;
}

.bcl-entete {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.bcl-pastille {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #002FA7, #28A745);
}

.bcl-pastille svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bcl-croix {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.bcl-croix svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.bcl-croix:hover {
    background: #e2e8f0;
}

.bcl-croix:focus-visible {
    outline: 3px solid rgba(0, 47, 167, 0.35);
    outline-offset: 2px;
}

.bcl-entete {
    padding-right: 44px;
}

.bcl-carte:focus {
    outline: none;
}

.bcl-carte h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
}

.bcl-intro {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.55;
    color: #334155;
}

.bcl-exemple {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 16px;
}

.bcl-bloc {
    padding: 10px 12px;
    font-size: 13.5px;
    line-height: 1.5;
    border-radius: 12px;
    background: #f0f4f8;
}

.bcl-bloc b {
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.bcl-bloc.bcl-ia {
    background: #eaf3ff;
}

.bcl-etiquette {
    display: inline-block;
    padding: 0 6px;
    font-weight: 600;
    font-size: 12.5px;
    color: #002FA7;
    background: #ffffff;
    border: 1px solid #cddcff;
    border-radius: 6px;
}

.bcl-fleche {
    align-self: center;
    width: 22px;
    height: 22px;
    stroke: #28A745;
    fill: none;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bcl-points {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.bcl-points li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 11px;
    font-size: 15.5px;
    line-height: 1.5;
    color: #334155;
}

.bcl-points svg {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    stroke: #002FA7;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bcl-savoir {
    margin: 0 0 16px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    background: #f8fafc;
    border-radius: 12px;
}

.bcl-pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bcl-politique {
    font-size: 14px;
    color: #475569;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Bouton Web : pilule en degrade, ombre diffuse, jamais de contour ni d'ombre pleine. */
.bcl-fermer {
    min-width: 150px;
    height: 52px;
    padding: 0 26px;
    font: 700 16px/1 'Inter', system-ui, sans-serif;
    color: #ffffff;
    background: linear-gradient(112deg, #002FA7 8%, #1B7A34 96%);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 30px rgba(0, 47, 167, 0.28);
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.bcl-fermer:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

@keyframes bcl-voile {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bcl-carte {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
    .bcl-voile {
        align-items: flex-end;
        padding: 0;
    }
    .bcl-carte {
        max-width: none;
        max-height: 92vh;
        padding: 22px 18px 20px;
        border-radius: 22px 22px 0 0;
    }
    .bcl-exemple {
        grid-template-columns: 1fr;
    }
    .bcl-fleche {
        justify-self: center;
        transform: rotate(90deg);
    }
    .bcl-pied {
        flex-direction: column-reverse;
        align-items: stretch;
        text-align: center;
    }
    .bcl-fermer {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bcl-ligne, .bcl-voile, .bcl-carte {
        animation: none;
    }
    .bcl-fermer {
        transition: none;
    }
}
