/* ================================================================
   EC_STYLE.CSS — CHARTE DE L'ÉDITION EXPERT-COMPTABLE
   ----------------------------------------------------------------
   Fichier À PART, jamais fondu dans style_LCA.css : les deux chartes ont
   des identités différentes.

   Il porte ce qui est commun à TOUTES les fiches : les variables, la base,
   les titres, la punchline, les quatre commentaires, le logo, le header et
   le footer. Tout autre composant — tableaux, vignettes, échelle SRI… — se
   copie dans la fiche qui l'emploie.

   ⚠️ Pour changer l'identité visuelle de toutes les fiches d'un coup, ne
   toucher que la section A « Variables » : aucune couleur n'est écrite en
   dur ailleurs.

   SOMMAIRE
   A. Variables générales     E. Commentaires (4 niveaux)
   B. Reset & base            F. Logo
   C. Titres                  G. Header simple (v1)
   D. Punchline               H. Footer (v1)
   ================================================================ */


/* ================================================================
   A. VARIABLES GÉNÉRALES
   ================================================================
   Toutes les couleurs et dimensions de ce fichier sont définies ici.
   ⚠️ Ne jamais écrire de couleur en dur ailleurs : toujours var(--nom).
   ================================================================ */
:root {

  /* ── A.1 Police & taille de texte ── */
  --font-ui:  'Segoe UI', Arial, sans-serif;
  --fs-base:  14px;
  --lh-base:  1.6;

  /* ── A.2 Couleur de marque ──
     Charte sombre LCA : rouge vif sur fond très sombre.
     --brand       : rouge principal #cc0000 (rouge vif de la charte).
     --brand-light : fond sombre légèrement éclairci pour les zones info.
     --brand-mid   : gris métallique foncé pour bordures et séparateurs.
     --brand-dark  : rouge plus sombre pour hover et variantes foncées. */
  --brand:        #cc0000;
  --brand-light:  #2a1a1a;
  --brand-mid:    #3a3a3a;
  --brand-dark:   #990000;

  /* ── A.3 Couleurs sémantiques ── */
  --bull:         #22a855;
  --bull-bg:      #0d2b1a;
  --bull-border:  #1a5c34;
  --bear:         #ff4444;
  --bear-bg:      #2a0d0d;
  --bear-border:  #7a1a1a;

  /* ── A.4 Fonds ──
     Palette sombre : fond de page très sombre, fond de carte gris foncé,
     fond document gris anthracite (pas blanc — sur fond sombre le blanc
     tranche trop ; un gris très foncé donne un rendu plus homogène). */
  --bg-page:   #111111;
  --bg-card:   #1e1e1e;
  --bg-white:  #242424;

  /* ── A.5 Texte ── */
  --text-primary:   #f0f0f0;
  --text-secondary: #cccccc;
  --text-muted:     #999999;
  --text-faint:     #666666;

  /* ── A.6 Formes & ombres ── */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  12px;
  --shadow-doc: 0 4px 32px rgba(0, 0, 0, 0.60);
  --border:     1px solid var(--brand-mid);

}


/* ================================================================
   B. RESET & BASE
   ================================================================
   Réinitialisation, fond de page, et la carte centrale « .doc » qui
   contient toute la fiche.
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

p {
  margin-bottom: 0.55rem;
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text-secondary);
}
p:last-child { margin-bottom: 0; }

/* Conteneur principal de la fiche */
.doc {
  max-width: 980px;
  margin: 32px auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-doc);
  overflow: hidden;
}

/* Conteneur générique d'une section de contenu (entre header et footer) */
.section { padding: 1.6rem 2rem; border-bottom: 1px solid #2e2e2e; }
.section:last-of-type { border-bottom: none; }


/* ================================================================
   C. TITRES (section / partie / sous-titre)
   ================================================================
   .sec-title  — titre d'une grande partie, fond bleu, numéroté :
                 <div class="sec-title">
                   <span class="sec-title__num">1</span> Titre de la section
                 </div>
   .part-title — niveau intermédiaire, sans fond, souligné :
                 <div class="part-title">Sous-partie</div>
   .sub-label  — petit intitulé en majuscules, pour annoter un bloc :
                 <div class="sub-label">Détail</div>
   ================================================================ */
.sec-title {
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}
.sec-title__num {
  background: rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 13px;
  font-weight: 800;
}

.part-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 1.4rem 0 0.8rem;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-mid);
}
.part-title:first-child { margin-top: 0; }

.sub-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-primary);
  margin: 1.1rem 0 0.6rem;
  border-left: 3px solid var(--brand);
  padding-left: 8px;
}


/* ================================================================
   D. PUNCHLINE
   ================================================================
   Phrase d'accroche, entre le header et la première section :
   <div class="punchline">Phrase d'accroche.</div>
   ================================================================ */
.punchline {
  background: #1a1a1a;
  padding: 18px 3.5rem;
  border-top: 1px solid #2e2e2e;
  border-bottom: 1px solid #2e2e2e;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.6;
  text-align: center;
  position: relative;
  margin-bottom: 1.2rem;
}
.punchline::before {
  content: '\201C';
  position: absolute;
  left: 1.5rem;
  top: 10px;
  font-size: 42px;
  color: var(--brand-mid);
  font-family: Georgia, serif;
  line-height: 1;
}
.punchline::after {
  content: '\201D';
  position: absolute;
  right: 1.5rem;
  bottom: 4px;
  font-size: 42px;
  color: var(--brand-mid);
  font-family: Georgia, serif;
  line-height: 1;
}


/* ================================================================
   E. COMMENTAIRES (INSIGHTS) — 4 niveaux
   ================================================================
   <div class="insight insight--classique">
     <p><strong>Titre.</strong> Texte du commentaire.</p>
   </div>

   Mêmes trois lignes pour --important et --tres-important. Le quatrième
   porte son propre titre :

   <div class="insight insight--principe">
     <div class="insight__title">Le principe fondamental</div>
     <p>Texte.</p>
   </div>
   ================================================================ */
.insight {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  margin: 12px 0;
}
.insight p { font-size: var(--fs-base); line-height: 1.7; }

/* — Classique : fond blanc, bordure grise neutre — */
.insight--classique {
  background: var(--bg-white);
  border: 1px solid #333333;
  border-left: 5px solid #4a4a4a;
  color: var(--text-secondary);
}
.insight--classique strong { color: var(--text-primary); }
.insight--classique p      { color: var(--text-secondary); }

/* — Important : fond bleu clair, bordure couleur de marque — */
.insight--important {
  background: var(--brand-light);
  border-left: 5px solid var(--brand);
  color: var(--text-primary);
}
.insight--important strong { color: var(--text-primary); }
.insight--important p      { color: var(--text-primary); }

/* — Très important : fond rouge, bordure rouge (alerte) — */
.insight--tres-important {
  background: var(--bear-bg);
  border-left: 5px solid var(--bear);
  color: var(--text-primary);
}
.insight--tres-important strong { color: var(--text-primary); }
.insight--tres-important p      { color: var(--text-primary); }

/* — Fondamental : encadré plein, fond couleur de marque, texte blanc — */
.insight--principe {
  background: var(--brand);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  color: #fff;
}
.insight--principe .insight__title {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 12px;
}
.insight--principe p {
  color: rgba(255,255,255,0.92);
  margin-bottom: 0.6rem;
}
.insight--principe p:last-child { margin-bottom: 0; }
.insight--principe strong { color: #fff; }
.insight--principe em { color: rgba(255,255,255,0.80); }


/* ================================================================
   F. LOGO
   ================================================================
   USAGE : <span class="lca-logo" role="img" aria-label="LCA Patrimoine">
           </span>

   Le logo est appelé en background-image depuis ce fichier : une fiche n'a
   jamais besoin d'en connaître l'URL. Pour en changer, modifier la seule
   URL ci-dessous — header et footer de toutes les fiches suivent.

   --logo-w / --logo-h définissent la boîte du logo. L'image y est affichée
   en entier, sans déformation, centrée. Ajuster --logo-w si elle paraît
   trop serrée ou laisse trop de vide sur les côtés.
   ================================================================ */
.lca-logo {
  --logo-w: 110px;
  --logo-h: 38px;
  display: inline-block;
  width: var(--logo-w);
  height: var(--logo-h);
  flex-shrink: 0;
  background-image: url('../images/EC_logo.webp');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


/* ================================================================
   G. HEADER SIMPLE (V1)
   ================================================================
   <div class="doc-header">
     <div class="doc-header__top">
       <div>
         <div class="doc-header__surtitle">PRÉ-TITRE</div>
         <div class="doc-header__title">Titre de la fiche</div>
         <div class="doc-header__subtitle">Sous-titre descriptif</div>
         <div class="doc-header__updated">Dernière mise à jour : …</div>
       </div>
       <span class="lca-logo" role="img" aria-label="LCA Patrimoine"></span>
     </div>
   </div>
   ================================================================ */

/* ── G.1 Bandeau principal du header ── */
.doc-header { background: var(--brand); padding: 1.4rem 2rem 1.2rem; }

/* Ligne du haut : bloc texte (pré-titre/titre/sous-titre) à gauche, logo à droite */
.doc-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.doc-header__top > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

/* ── G.2 Pré-titre ── */
.doc-header__surtitle {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ── G.3 Titre principal ── */
.doc-header__title {
  font-size: 36px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

/* ── G.4 Sous-titre ── */
.doc-header__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 7px;
}

/* ── G.5 Date de dernière mise à jour ──
   Petite ligne discrète sous le sous-titre. Optionnelle. */
.doc-header__updated {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-style: italic;
}

/* ── G.6 Bouton de retour dans le header ──
   Se place en second enfant de .doc-header__top (le flex le pousse a
   droite, en face du bloc de titre). Ghost BLANC et non rouge : le
   header est deja sur var(--brand), un bouton rouge y serait invisible.
   USAGE : <a class="doc-header__retour" href="…">← Retour revue</a> */
.doc-header__retour {
  flex-shrink: 0;
  align-self: center;
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.doc-header__retour:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand);
}


/* ================================================================
   H. FOOTER (V1 — simple)
   ================================================================
   <div class="doc-footer">
     <div class="doc-footer__row">
       <div class="doc-footer__legal">
         <span>LCA Patrimoine — SIRET …</span>
         <span>Document non contractuel à caractère informatif</span>
       </div>
       <img src="…" alt="LCA Patrimoine" class="lca-logo">
     </div>
   </div>
   ================================================================ */
.doc-footer {
  background: var(--brand);
  padding: 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.doc-footer__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1rem;
  flex-wrap: wrap;
}
.doc-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 900px) {
  .doc {
    margin: 22px 16px;
  }

  .doc-header,
  .section,
  .doc-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .doc-header__top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.9rem;
  }

  .doc-header__title {
    font-size: 30px;
  }

  .doc-header__subtitle {
    font-size: 13px;
  }

  .punchline {
    padding-left: 3rem;
    padding-right: 1.25rem;
  }
}

@media (max-width: 640px) {
  .doc {
    margin: 12px;
    border-radius: 10px;
  }

  .doc-header,
  .section,
  .doc-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .doc-header {
    padding-top: 1.1rem;
    padding-bottom: 1rem;
  }

  .doc-header__surtitle {
    font-size: 11px;
    letter-spacing: 0.14em;
  }

  .doc-header__title {
    font-size: 24px;
    line-height: 1.15;
  }

  .doc-header__subtitle,
  .doc-header__updated {
    font-size: 12px;
  }

  .sec-title {
    font-size: 18px;
    line-height: 1.3;
    flex-wrap: wrap;
  }

  .punchline {
    padding: 14px 1rem 14px 2.5rem;
    font-size: 13px;
  }

  .punchline::before,
  .punchline::after {
    font-size: 30px;
  }

  .doc-footer__row {
    align-items: flex-start;
  }

  .lca-logo {
    --logo-w: 96px;
    --logo-h: 34px;
  }
}


