/*
  Charte du site prudence.bj — commune avec l'application Prudence.

  Palette (identique à public/css/rssi.css de Prudence) :
    --pr-marine-900  #071426  marine profond : texte, bandeaux sombres, pied de page
    --pr-marine-700  #12355b  marine : survols
    --pr-bleu-600    #1d4f86  marine éclairci : couleur primaire (boutons, liens)
    --pr-nuage-300   #a9bcd0  nuage : accents doux sur fond sombre
    --pr-nuage-50    #f5f7fb  brume : fond de page
  Couleurs d'état FIGÉES (mêmes valeurs que l'application) : succès #10b981,
  danger #ef4444, avertissement #f59e0b, information #0ea5e9.

  Polices : pile système, sans Google Fonts (aucune connexion à un tiers avant
  consentement, et une requête de moins sur connexion mobile).
*/

:root {
  --pr-marine-900: #071426;
  --pr-marine-700: #12355b;
  --pr-bleu-600: #1d4f86;
  --pr-bleu-400: #2f6aa6;
  --pr-nuage-300: #a9bcd0;
  --pr-nuage-50: #f5f7fb;

  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-bg: var(--pr-nuage-50);
  --bs-body-color: var(--pr-marine-900);
  --bs-emphasis-color: var(--pr-marine-900);
  --bs-secondary-color: #52657d;             /* marine grisé : 5,6:1 sur la brume (contraste AA) */
  --bs-border-color: #dde5ee;
  --bs-primary: #1d4f86;   --bs-primary-rgb: 29, 79, 134;
  --bs-link-color: #1d4f86; --bs-link-color-rgb: 29, 79, 134;
  --bs-link-hover-color: #12355b; --bs-link-hover-color-rgb: 18, 53, 91;
  --bs-focus-ring-color: rgba(29, 79, 134, .25);
  --bs-success: #10b981;   --bs-success-rgb: 16, 185, 129;
  --bs-danger: #ef4444;    --bs-danger-rgb: 239, 68, 68;
  --bs-warning: #f59e0b;   --bs-warning-rgb: 245, 158, 11;
  --bs-info: #0ea5e9;      --bs-info-rgb: 14, 165, 233;

  --pr-ombre: 0 1px 2px rgba(7, 20, 38, .04), 0 8px 28px -12px rgba(29, 79, 134, .18);
  --pr-ombre-survol: 0 2px 4px rgba(7, 20, 38, .06), 0 16px 36px -12px rgba(29, 79, 134, .28);
  --pr-rayon: 16px;
  --pr-degrade: linear-gradient(135deg, #0b2240 0%, #12355b 45%, #1d4f86 100%);
  --pr-nuages: radial-gradient(900px 420px at 95% -10%, rgba(169, 188, 208, .35), transparent 60%),
               radial-gradient(700px 360px at -10% 110%, rgba(169, 188, 208, .22), transparent 60%);
}

/* Boutons primaires aux couleurs de la charte (Bootstrap compile ses boutons avec son bleu). */
.btn-primary {
  --bs-btn-bg: #1d4f86; --bs-btn-border-color: #1d4f86;
  --bs-btn-hover-bg: #12355b; --bs-btn-hover-border-color: #12355b;
  --bs-btn-active-bg: #0b2240; --bs-btn-active-border-color: #0b2240;
  --bs-btn-disabled-bg: #1d4f86; --bs-btn-disabled-border-color: #1d4f86;
}
.btn-outline-primary {
  --bs-btn-color: #1d4f86; --bs-btn-border-color: #1d4f86;
  --bs-btn-hover-bg: #1d4f86; --bs-btn-hover-border-color: #1d4f86;
  --bs-btn-active-bg: #12355b; --bs-btn-active-border-color: #12355b;
}
.btn-clair { background: #fff; color: var(--pr-marine-900); border: 1px solid #fff; font-weight: 600; }
.btn-clair:hover { background: var(--pr-nuage-50); color: var(--pr-marine-900); }
.btn { border-radius: 10px; }
.text-primary { color: var(--pr-bleu-600) !important; }

/* Lien d'évitement : premier élément focalisable, visible seulement au clavier (accessibilité). */
.lien-evitement { position: absolute; left: -9999px; top: .5rem; z-index: 2000; }
.lien-evitement:focus { left: .5rem; background: #fff; padding: .5rem 1rem; border-radius: 8px; box-shadow: var(--pr-ombre); }

/* ------------------------------------------------------------------ logo texte */
/* « Prudence. » : mot en gras, point final bleu = la vigilance, signature discrète. */
.logo { display: inline-flex; align-items: baseline; gap: .55rem; text-decoration: none; color: inherit; }
.logo-mot { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1; color: var(--pr-marine-900); }
.logo-mot .point { color: var(--pr-bleu-600); }
.logo-signature { font-size: .78rem; color: var(--bs-secondary-color); font-weight: 500; white-space: nowrap; }
.sombre .logo-mot { color: #fff; }
.sombre .logo-mot .point { color: var(--pr-nuage-300); }
.sombre .logo-signature { color: var(--pr-nuage-300); }

/* ------------------------------------------------------------------ navigation */
.barre-nav { background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--bs-border-color); }
.barre-nav .nav-link { color: var(--pr-marine-900); font-weight: 500; }
.barre-nav .nav-link:hover, .barre-nav .nav-link.active { color: var(--pr-bleu-600); }
.barre-nav .dropdown-menu { border-radius: 12px; border-color: var(--bs-border-color); box-shadow: var(--pr-ombre); }

/* ------------------------------------------------------------------ bandeaux */
.bandeau-hero { background: var(--pr-nuages), var(--pr-degrade); color: #fff; }
.bandeau-hero .lead, .bandeau-hero .texte-doux { color: #d5e0ec; }
.bandeau-hero h1 { font-weight: 800; letter-spacing: -.02em; }
.bandeau-page { background: var(--pr-nuages), #fff; border-bottom: 1px solid var(--bs-border-color); }
.bandeau-page h1 { font-weight: 800; letter-spacing: -.015em; }
.bandeau-appel { background: var(--pr-degrade); color: #fff; border-radius: var(--pr-rayon); }
.bandeau-appel p { color: #d5e0ec; }
.surtitre { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--pr-bleu-600); }
.bandeau-hero .surtitre { color: var(--pr-nuage-300); }

/* ------------------------------------------------------------------ cartes */
.carte { background: #fff; border: 1px solid var(--bs-border-color); border-radius: var(--pr-rayon); box-shadow: var(--pr-ombre); }
.carte-lien { transition: box-shadow .15s ease, transform .15s ease; color: inherit; text-decoration: none; display: block; }
.carte-lien:hover { box-shadow: var(--pr-ombre-survol); transform: translateY(-2px); color: inherit; }
.icone-ronde { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(29, 79, 134, .1); color: var(--pr-bleu-600); font-size: 1.3rem; flex-shrink: 0; }
.liste-coches { list-style: none; padding-left: 0; }
.liste-coches li { position: relative; padding-left: 1.6rem; margin-bottom: .45rem; }
.liste-coches li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .05rem; color: var(--bs-success); }

/* ------------------------------------------------------------------ aperçu du tableau de bord (illustration HTML) */
.apercu { background: #fff; color: var(--pr-marine-900); border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); overflow: hidden; font-size: .82rem; }
.apercu-barre { background: #eef2f7; padding: .45rem .75rem; display: flex; gap: .35rem; align-items: center; }
.apercu-barre span { width: 9px; height: 9px; border-radius: 50%; background: #c8d3df; }
.apercu-barre .adresse { flex: 1; margin-left: .5rem; background: #fff; border-radius: 6px; padding: .1rem .5rem; color: #52657d; font-size: .72rem; width: auto; height: auto; }
.apercu-kpi { border: 1px solid var(--bs-border-color); border-radius: 10px; padding: .5rem .65rem; }
.apercu-kpi b { display: block; font-size: 1.15rem; }
.pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; }
.pastille.ok { background: var(--bs-success); } .pastille.ko { background: var(--bs-danger); } .pastille.av { background: var(--bs-warning); }

/* ------------------------------------------------------------------ tarifs */
.carte-tarif { height: 100%; display: flex; flex-direction: column; }
.carte-tarif.vedette { border: 2px solid var(--pr-bleu-600); position: relative; }
.carte-tarif .etiquette-vedette { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); background: var(--pr-bleu-600); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 999px; white-space: nowrap; }
.prix { font-size: 1.8rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
/* « HT / mois » sur sa propre ligne : évite la coupure au milieu dans les cartes étroites. */
.prix small { display: block; font-size: .85rem; font-weight: 500; color: var(--bs-secondary-color); letter-spacing: 0; margin-top: .15rem; }
.bascule-periode .btn { min-width: 8.5rem; }
[data-periode="annuel"] .si-mensuel, [data-periode="mensuel"] .si-annuel { display: none; }
.table-comparaison th, .table-comparaison td { white-space: nowrap; }

/* ------------------------------------------------------------------ textes longs (légal, documentation) */
.texte-long { max-width: 820px; }
.texte-long h2 { font-size: 1.25rem; margin-top: 2rem; font-weight: 700; }
.texte-long h3 { font-size: 1.05rem; margin-top: 1.4rem; font-weight: 700; }
.a-completer { background: #fff7e6; border: 1px dashed var(--bs-warning); border-radius: 6px; padding: 0 .35rem; font-size: .92em; }
.hommage { border-left: 4px solid var(--pr-nuage-300); background: #fff; border-radius: 0 var(--pr-rayon) var(--pr-rayon) 0; padding: 1.5rem 1.75rem; }
code { color: var(--pr-bleu-600); }
pre.commande { background: var(--pr-marine-900); color: #e6edf5; border-radius: 10px; padding: .85rem 1rem; font-size: .85rem; white-space: pre-wrap; word-break: break-all; }

/* ------------------------------------------------------------------ formulaires */
.form-control, .form-select { border-radius: 10px; }
/* Champ piège anti-robot : hors écran (et non display:none, que certains robots détectent). */
.champ-piege { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ pied de page */
.pied { background: var(--pr-marine-900); color: #b9c7d7; }
.pied a { color: #dbe5f0; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pr-nuage-300); font-weight: 700; }
.pied .bouton-lien { background: none; border: 0; padding: 0; color: #dbe5f0; }
.pied .bouton-lien:hover { color: #fff; text-decoration: underline; }

/* ------------------------------------------------------------------ bandeau de consentement */
/* Refuser et accepter : mêmes dimensions, même style, même niveau (exigence APDP / CNIL). */
.consentement { position: fixed; z-index: 1080; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; margin-left: auto;
  background: #fff; border: 1px solid var(--bs-border-color); border-radius: var(--pr-rayon); box-shadow: 0 20px 50px -15px rgba(7, 20, 38, .35); padding: 1.1rem 1.25rem; }
.consentement[hidden] { display: none; }
.consentement .actions .btn { flex: 1 1 0; min-width: 9rem; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 575.98px) {
  .logo-signature { display: none; }
  .prix { font-size: 1.55rem; }
  .consentement { left: .5rem; right: .5rem; bottom: .5rem; }
  .bandeau-hero .display-5 { font-size: 2rem; }
}

/* Réduction des animations si le visiteur l'a demandé à son système. */
@media (prefers-reduced-motion: reduce) {
  .carte-lien, .carte-lien:hover { transition: none; transform: none; }
}
