/* ============================================================================
   ECRANS.CSS — Module « Écrans & réseaux sociaux » d'ÉQUILIBRE
   Styles dédiés, sur le pattern d'addictions.css. Réutilise les variables
   CSS globales définies dans equilibre.html (--teal, --ink, --paper, etc.).
   Contient aussi la règle de justification typographique opt-in .eq-justify,
   pensée pour être réutilisable par les futurs modules du site.
   ========================================================================== */

/* --- Règle de justification globale du site (opt-in, jamais un sélecteur p) ---
   hyphens:none volontaire : pas de césure automatique des mots courants.
   max-width/line-height limités à la prose (.eq-justify), jamais à .ecr-main
   ni aux grilles/cartes. .ecr-article p.eq-justify renforce la spécificité
   face à la règle .ecr-article p{line-height:1.6} déjà présente plus bas. --- */
.eq-justify,.ecr-article p.eq-justify{text-align:justify;text-justify:inter-word;-webkit-hyphens:none;hyphens:none;word-break:normal;overflow-wrap:normal;max-width:70ch;line-height:1.75;}
@media (max-width:650px){.eq-justify,.ecr-article p.eq-justify{text-align:left;text-justify:auto;-webkit-hyphens:none;hyphens:none;}}

/* --- Mise en page générale --- */
.ecr-main{max-width:760px;}
.ecr-global-nav{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:20px;}
.ecr-global-nav .eq-back{margin:0;min-height:44px;}
.ecr-nav-home{background:#fff;color:var(--teal-deep);border-color:var(--teal);}
.ecr-global-nav .eq-back:hover,.ecr-global-nav .eq-back:focus-visible{border-color:var(--teal-deep);outline:3px solid rgba(63,110,122,.22);outline-offset:2px;}
.ecr-article{margin:18px 0 26px;}
.ecr-article p{margin:0 0 14px;line-height:1.6;}
.ecr-article h1{font-size:26px;margin:26px 0 12px;}
.ecr-article h2{font-size:21px;margin:24px 0 10px;color:var(--ink);}
.ecr-article h3{font-size:17px;margin:18px 0 8px;color:var(--teal-deep);}
.ecr-article h4{font-size:15px;margin:14px 0 6px;}
.ecr-article blockquote{margin:16px 0;padding:14px 18px;border-left:4px solid var(--teal);background:#f3f7f6;border-radius:0 12px 12px 0;font-weight:600;}
.ecr-article hr{border:none;border-top:1px solid var(--line);margin:26px 0;}
.ecr-list{margin:0 0 14px;padding-left:20px;}
.ecr-list li{margin-bottom:6px;line-height:1.55;}

/* --- Introduction validée : entrée forte, chaleureuse et immédiatement identifiable --- */
.ecr-opening>.ecr-callout--blue_bg:first-of-type{position:relative;overflow:hidden;padding:26px 28px;border-color:#244f5c;background:linear-gradient(135deg,#244f5c 0%,#376f79 58%,#496b64 100%);color:#fff;box-shadow:0 22px 48px -34px rgba(28,42,46,.85);}
.ecr-opening>.ecr-callout--blue_bg:first-of-type::after{content:"";position:absolute;width:190px;height:190px;right:-92px;bottom:-118px;border:1px solid rgba(255,255,255,.24);border-radius:50%;}
.ecr-opening>.ecr-callout--blue_bg:first-of-type .ecr-callout-icon{color:#fff;filter:saturate(.9) brightness(1.18);}
.ecr-opening>.ecr-callout--blue_bg:first-of-type .ecr-callout-body{position:relative;z-index:1;}
.ecr-opening>.ecr-callout--blue_bg:first-of-type p{color:#fff;}
.ecr-opening-question{display:block;margin:18px 0 10px;padding:14px 16px;border-left:3px solid #f0bd70;border-radius:0 12px 12px 0;background:rgba(255,255,255,.1);color:#fff;font-size:1.05em;line-height:1.55;}
.ecr-opening-signature{display:block;margin-top:16px;color:#fff;letter-spacing:.025em;}

/* --- #ÉCHO : situations concrètes, cartes différenciées --- */
.ecr-echo{background:#fff4e6;border:1px solid #f0cfa0;border-radius:14px;padding:14px 16px;font-weight:600;color:#7a4b06;}

/* --- Callouts : identité visuelle stable par fonction (couleur Notion préservée) --- */
.ecr-callout{display:flex;gap:12px;align-items:flex-start;margin:16px 0;padding:16px 18px;border-radius:16px;border:1px solid var(--line);background:#f6f5f0;}
.ecr-callout-icon{font-size:20px;line-height:1;flex:0 0 auto;}
.ecr-callout-body p:last-child{margin-bottom:0;}
.ecr-callout--green_bg{background:#eaf5ee;border-color:#bfe0cc;}
.ecr-callout--blue_bg{background:#eaf2f7;border-color:#bcd6e6;}
.ecr-callout--purple_bg{background:#f1edf9;border-color:#d3c5ef;}
.ecr-callout--yellow_bg{background:#fbf3d9;border-color:#e9d488;}
.ecr-callout--gray_bg{background:#f1f1ee;border-color:#dcdcd4;}

/* --- Colonnes (Notion <columns>) --- */
.ecr-columns{display:flex;flex-wrap:wrap;gap:16px;margin:18px 0;}
.ecr-column{flex:1 1 260px;min-width:0;}
.ecr-column .ecr-callout{height:100%;margin:0;}

/* --- Tables (Notion <table>) --- */
.ecr-table-wrap{overflow-x:auto;margin:18px 0;border-radius:14px;border:1px solid var(--line);}
.ecr-table{width:100%;border-collapse:collapse;min-width:420px;}
.ecr-table th,.ecr-table td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line);font-size:14px;}
.ecr-table th{background:#eef2ef;font-weight:800;}
.ecr-table tr:last-child td{border-bottom:none;}

/* --- Accordéons (dossiers, glossaire, 6 portes) --- */
.ecr-dossier-items{display:flex;flex-direction:column;gap:12px;margin:20px 0;}
.ecr-accordion{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden;}
.ecr-accordion h4{margin:0;}
.ecr-accordion-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;background:none;border:none;text-align:left;font-size:15px;font-weight:700;color:var(--ink);cursor:pointer;min-height:54px;}
.ecr-accordion-toggle:hover,.ecr-accordion-toggle:focus-visible{background:#f6f5f0;}
.ecr-accordion-arrow{transition:transform .2s;color:var(--teal-deep);}
.ecr-accordion-toggle[aria-expanded="true"] .ecr-accordion-arrow{transform:rotate(180deg);}
.ecr-accordion-panel{padding:0 18px 18px;}
.ecr-detail{border:1px solid var(--line);border-radius:14px;margin:14px 0;overflow:hidden;background:#fbfbf9;}
.ecr-detail>summary{padding:12px 16px;font-weight:700;cursor:pointer;list-style:none;}
.ecr-detail>summary::-webkit-details-marker{display:none;}
.ecr-detail-body{padding:0 16px 16px;}

/* --- Portes d'entrée (accueil du module) --- */
.ecr-door-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:22px 0;}
.ecr-door{position:relative;text-align:left;border:1px solid transparent;border-radius:22px;padding:24px;min-height:150px;display:flex;flex-direction:column;gap:10px;color:#fff;transition:transform .2s,box-shadow .2s;}
.ecr-door:hover,.ecr-door:focus-visible{transform:translateY(-3px);box-shadow:0 18px 40px -28px rgba(28,42,46,.6);outline:3px solid rgba(63,110,122,.25);outline-offset:2px;}
.ecr-door strong{font-size:19px;}
.ecr-door span{font-size:14px;opacity:.92;}
.ecr-door-arrow{position:absolute;bottom:20px;right:22px;font-size:20px;}
.ecr-door.ecrans{background:linear-gradient(135deg,#2f6472,#1e4750);}
.ecr-door.reseaux{background:linear-gradient(135deg,#6d4fa0,#4a3170);}
.ecr-door.ecrans,.ecr-door.reseaux,.ecr-door.ecrans strong,.ecr-door.reseaux strong,.ecr-door.ecrans span,.ecr-door.reseaux span{color:#fff;}
.ecr-door.ecrans .ecr-door-arrow,.ecr-door.reseaux .ecr-door-arrow{opacity:1;}

/* --- Liens / boutons de navigation --- */
.ecr-link{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:700;font-size:13px;cursor:pointer;}
.ecr-link:hover,.ecr-link:focus-visible{background:#f6f5f0;border-color:var(--teal);}
.ecr-link.bridge{border-style:dashed;color:var(--teal-deep);}
.ecr-context{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px;}
.ecr-secondary-nav{padding-top:16px;border-top:1px solid var(--line);}

/* --- Responsive --- */
@media (max-width:760px){
  .ecr-door-grid{grid-template-columns:1fr;}
  .ecr-columns{flex-direction:column;}
}
@media (max-width:600px){
  .ecr-global-nav{display:grid;grid-template-columns:1fr;}
  .ecr-global-nav .eq-back{width:100%;text-align:left;}
}
@media (max-width:480px){
  .ecr-opening>.ecr-callout--blue_bg:first-of-type{padding:20px 18px;}
  .ecr-opening-question{padding:12px 13px;font-size:1em;}
  .ecr-accordion-toggle{font-size:14px;padding:14px;}
  .ecr-door{padding:18px;min-height:120px;}
}
