/* ==========================================================================
   EUDUC — www.euduc.com
   Direction artistique « Héritage Académique »
   Tokens & composants repris fidèlement du handoff design.
   ========================================================================== */

:root {
  /* Navy / autorité */
  --eu-navy:          #011D4B;
  --eu-navy-footer:   #01153B;
  /* Or / prestige */
  --eu-gold:          #FFD231;
  --eu-gold-border:   #E6C200;
  --eu-gold-dark:     #A77B10;
  --eu-gold-footer:   #C9A84A;
  /* Bleu ardoise */
  --eu-slate:         #6783B2;
  /* Fonds */
  --eu-parchment:     #EDE6D5;
  --eu-parchment-deep:#E7DDC8;
  --eu-ivory:         #FAF6EC;
  --eu-ivory-light:   #FBF8F0;
  /* Filets */
  --eu-hairline:      #E2D9C4;
  --eu-card-line:     #E9E0CE;
  /* Texte */
  --eu-text:          #23262F;
  --eu-text-2:        #5C5950;
  --eu-muted:         #797568;
  --eu-on-navy:       #B7C2D8;
  --eu-on-navy-muted: #8896B2;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--eu-text);
  background: var(--eu-parchment);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a, button { font-family: 'Manrope', sans-serif; }
button { cursor: pointer; white-space: nowrap; }
img { max-width: 100%; }

/* ---------- Conteneur ---------- */
.eu-container { max-width: 1280px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }

/* ---------- Lien tertiaire (soulignement or qui se déploie) ---------- */
.eu-tert { position: relative; }
.eu-tert .eu-ul { transition: transform .35s cubic-bezier(.2,.6,.2,1); transform-origin: left; }
.eu-tert:hover .eu-ul { transform: scaleX(1) !important; }
.eu-tert .eu-ar { transition: transform .35s cubic-bezier(.2,.6,.2,1); }
.eu-tert:hover .eu-ar { transform: translateX(4px); }

/* ---------- Cartes (soulèvement + ombre navy au survol) ---------- */
.eu-card { transition: transform .3s ease, box-shadow .3s ease; }
.eu-card:hover { transform: translateY(-5px); box-shadow: 0 36px 60px -42px rgba(1,29,76,.4); }

/* ---------- Boutons ---------- */
.eu-btn { transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease; }
.eu-btn:hover { transform: translateY(-2px); }

/* ---------- Icônes réseaux (footer) ---------- */
.eu-soc { transition: border-color .25s ease, color .25s ease, background .25s ease; }
.eu-soc:hover { border-color: #FFD231; color: #FFD231; }

/* ---------- Survol des liens cliquables ---------- */
/* En-tête : liens du menu → or foncé au survol */
header nav a { transition: color .2s ease; }
header nav a:hover { color: #A77B10 !important; }
/* Sélecteur de langue FR/EN → or foncé au survol */
.eu-lang { cursor: pointer; transition: color .2s ease; }
.eu-lang:hover, .eu-lang:hover .eu-lang-fr { color: #A77B10 !important; }
/* Pied de page : tous les liens → or vif au survol */
footer a { transition: color .2s ease; }
footer a:hover { color: #FFD231 !important; }
/* Sous-menu de page (Retour / Accueil) */
.eu-sublink { transition: color .2s ease; }
.eu-sublink:hover { color: #A77B10 !important; }

/* ---------- Chips de filtre (catalogue) ---------- */
.eu-chip {
  cursor: pointer;
  border: 1px solid #D8CBAE;
  background: #FBF8F0;
  color: #5C5950;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.eu-chip.is-active { border-color: #011D4B; background: #011D4B; color: #fff; }
.eu-card.is-hidden { display: none !important; }

/* ---------- Accordéon (détail formation) ---------- */
.eu-acc-body { overflow: hidden; transition: max-height .3s ease; }

/* ---------- Champs de formulaire ---------- */
.eu-in { transition: border-color .2s ease; }
.eu-in:focus { border-color: #011D4B !important; outline: none; }
input::placeholder, textarea::placeholder { color: #A39A88; }

/* ---------- Pages « document légal » ---------- */
.eu-legal { color: #3A3D47; font-size: 15px; line-height: 1.72; }
.eu-legal h2 { font-family: 'Newsreader', serif; font-weight: 500; font-size: 25px; color: #011D4B; margin: 40px 0 12px; }
.eu-legal h3 { font-size: 14.5px; font-weight: 700; color: #011D4B; margin: 22px 0 6px; letter-spacing: .01em; }
.eu-legal p  { margin: 0 0 14px; }
.eu-legal ul { margin: 0 0 16px; padding-left: 22px; }
.eu-legal li { margin: 0 0 8px; }
.eu-legal a  { color: #A77B10; text-decoration: none; font-weight: 600; }
.eu-legal a:hover { text-decoration: underline; }
.eu-legal strong { color: #011D4B; }
.eu-legal .eu-note { background: #FBF8F0; border: 1px solid #E9E0CE; border-left: 3px solid #FFD231; border-radius: 8px; padding: 14px 18px; margin: 0 0 16px; font-size: 14px; }
/* Placeholder à compléter par l'éditeur (mis en évidence) */
.eu-ph { background: #FFF6D6; border: 1px dashed #E0C766; border-radius: 5px; padding: 1px 7px; font-weight: 700; color: #8A6D12; }

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   EDDY — assistant (widget de chat)
   ========================================================================== */
.eu-eddy-launch {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 60px; height: 60px; border-radius: 50%;
  background: #011D4B; color: #FFD231; border: 2px solid #FFD231;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 16px 34px -12px rgba(1,29,76,.6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.eu-eddy-launch:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -14px rgba(1,29,76,.7); }
.eu-eddy-launch.is-hidden { display: none; }

.eu-eddy {
  position: fixed; right: 22px; bottom: 22px; z-index: 71;
  width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 44px);
  background: #FBF8F0; border: 1px solid #E2D9C4; border-radius: 18px; overflow: hidden;
  display: none; flex-direction: column;
  box-shadow: 0 40px 90px -30px rgba(1,18,40,.6);
}
.eu-eddy.is-open { display: flex; animation: euPop .22s ease; }

/* Invite proactive (« Besoin d'aide ? ») */
.eu-eddy-nudge { position: fixed; right: 22px; bottom: 94px; z-index: 70; max-width: 256px;
  background: #fff; border: 1px solid #E2D9C4; border-radius: 14px; padding: 13px 30px 13px 13px;
  box-shadow: 0 18px 42px -16px rgba(1,29,76,.5); display: flex; gap: 10px; align-items: flex-start;
  cursor: pointer; animation: euPop .25s ease; }
.eu-eddy-nudge .eu-eddy-nudge-ava { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #011D4B; color: #FFD231; font-family: 'Newsreader', serif; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.eu-eddy-nudge .eu-eddy-nudge-txt { font-size: 13px; line-height: 1.45; color: #23262F; }
.eu-eddy-nudge .eu-eddy-nudge-x { position: absolute; top: 6px; right: 8px; background: none; border: none; font-size: 18px; line-height: 1; color: #A39A88; cursor: pointer; }
@media (max-width: 560px) { .eu-eddy-nudge { right: 16px; bottom: 86px; } }
@keyframes euPop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.eu-eddy-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #011D4B; color: #fff; padding: 14px 16px; position: relative; }
.eu-eddy-head::before { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(123deg, transparent 0 22px, rgba(255,255,255,.03) 22px 23px); pointer-events: none; }
.eu-eddy-id { display: flex; align-items: center; gap: 11px; position: relative; }
.eu-eddy-ava { width: 38px; height: 38px; border-radius: 50%; background: #FFD231; color: #011D4B; font-family: 'Newsreader', serif; font-weight: 600; font-size: 19px; display: flex; align-items: center; justify-content: center; }
.eu-eddy-titles { display: flex; flex-direction: column; line-height: 1.2; }
.eu-eddy-titles strong { font-size: 15px; }
.eu-eddy-titles small { font-size: 11.5px; color: #9FB0CE; }
.eu-eddy-tools { display: flex; gap: 4px; position: relative; }
.eu-eddy-iconbtn { width: 32px; height: 32px; border-radius: 8px; background: transparent; border: none; color: #B7C2D8; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s; }
.eu-eddy-iconbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.eu-eddy.is-muted .eu-eddy-wave { display: none; }

.eu-eddy-body { flex: 1; overflow-y: auto; padding: 18px 16px; background: #EDE6D5; display: flex; flex-direction: column; gap: 12px; }
.eu-eddy-msg { max-width: 84%; font-size: 14px; line-height: 1.5; padding: 11px 14px; border-radius: 14px; }
.eu-eddy-msg a { color: #A77B10; font-weight: 700; text-decoration: none; }
.eu-eddy-msg a:hover { text-decoration: underline; }
.eu-eddy-eddy { align-self: flex-start; background: #FAF6EC; border: 1px solid #E9E0CE; color: #23262F; border-bottom-left-radius: 5px; }
.eu-eddy-user { align-self: flex-end; background: #011D4B; color: #fff; border-bottom-right-radius: 5px; }
.eu-eddy-user a { color: #FFD231; }
.eu-eddy-typing { align-self: flex-start; background: #FAF6EC; border: 1px solid #E9E0CE; border-bottom-left-radius: 5px; display: inline-flex; gap: 5px; padding: 14px 16px; }
.eu-eddy-typing span { width: 7px; height: 7px; border-radius: 50%; background: #A39A88; display: inline-block; animation: euTyping 1.2s infinite ease-in-out; }
.eu-eddy-typing span:nth-child(2) { animation-delay: .18s; }
.eu-eddy-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes euTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.eu-eddy-sugg { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px 0; background: #FBF8F0; }
.eu-eddy-chip { font-size: 12.5px; font-weight: 600; color: #011D4B; background: #FFF6D6; border: 1px solid #E8D6A0; border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: background .2s, border-color .2s; }
.eu-eddy-chip:hover { background: #FFE9A8; border-color: #E6C200; }

.eu-eddy-form { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #FBF8F0; border-top: 1px solid #E9E0CE; }
.eu-eddy-form input { flex: 1; font-size: 14px; color: #011D4B; padding: 11px 13px; border: 1px solid #D8CBAE; border-radius: 10px; background: #fff; outline: none; transition: border-color .2s; }
.eu-eddy-form input:focus { border-color: #011D4B; }
.eu-eddy-send { width: 42px; height: 42px; flex: none; border-radius: 10px; background: #FFD231; color: #011D4B; border: 1px solid #E6C200; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.eu-eddy-send:hover { transform: translateY(-2px); }

@media (max-width: 560px) {
  .eu-eddy { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .eu-eddy-launch { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .eu-eddy.is-open { animation: none; }
  .eu-eddy-typing span { animation: none; }
}

/* ==========================================================================
   Menu mobile (hamburger) — caché en desktop
   ========================================================================== */
.eu-burger { display: none; }
.eu-mobile-menu { display: none; }
.eu-mobile-menu { flex-direction: column; background: #FBF8F0; border-top: 1px solid #E2D9C4; padding: 8px 22px 18px; }
.eu-mobile-menu a { padding: 13px 2px; font-size: 15.5px; font-weight: 600; color: #23262F; text-decoration: none; border-bottom: 1px solid #EDE6D5; }
.eu-mobile-menu a:last-child { border-bottom: 0; }
.eu-mobile-menu .eu-mm-cta { margin-top: 12px; text-align: center; background: #FFD231; color: #011D4B; font-weight: 700; border: 1px solid #E6C200; border-radius: 8px; padding: 13px; }
.eu-mobile-menu .eu-mm-ghost { margin-top: 8px; text-align: center; border: 1px solid #CDBF9F; border-radius: 8px; color: #011D4B; }

/* ==========================================================================
   Responsive — repli mobile / tablette
   ========================================================================== */
@media (max-width: 880px) {
  .eu-container { padding-left: 22px; padding-right: 22px; }
  /* Les grilles 2/3/4 colonnes s'empilent */
  .eu-grid-collapse { grid-template-columns: 1fr !important; }
  .eu-detail-grid { grid-template-columns: 1fr !important; }
  .eu-hide-mobile { display: none !important; }

  /* Bouton hamburger visible ; menu déroulant si ouvert */
  .eu-burger { display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid #CDBF9F; border-radius: 9px;
    background: #FBF8F0; color: #011D4B; cursor: pointer; }
  .eu-mobile-menu.is-open { display: flex; }

  /* Typographie fluide — empêche les grands titres de déborder */
  h1 { font-size: clamp(29px, 8.4vw, 52px) !important; line-height: 1.15 !important; }
  h2 { font-size: clamp(23px, 6vw, 40px) !important; line-height: 1.2 !important; }
  h3 { font-size: clamp(18px, 4.8vw, 24px) !important; }
  h1, h2, h3, p, span, a, li { overflow-wrap: break-word; }
}

/* Cartes d'offre EUDUC Lab (cliquables) */
.eu-offer-card{ transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.eu-offer-card:hover{ transform:translateY(-3px); box-shadow:0 16px 34px -18px rgba(1,29,75,.4); border-color:#C9BC9E; }

/* Article / contenu riche éditable (À propos, pages d'offres) */
.eu-rich{ font-size:16.5px; line-height:1.78; color:#2C2A24; }
.eu-rich h2{ font-family:'Newsreader',serif; font-weight:500; font-size:30px; color:#011D4B; margin:40px 0 14px; line-height:1.2; }
.eu-rich h3{ font-family:'Newsreader',serif; font-weight:500; font-size:22px; color:#011D4B; margin:30px 0 10px; }
.eu-rich h4{ font-size:16px; font-weight:700; color:#011D4B; margin:24px 0 8px; }
.eu-rich p{ margin:0 0 16px; }
.eu-rich ul,.eu-rich ol{ margin:0 0 18px; padding-left:22px; }
.eu-rich li{ margin:0 0 9px; }
.eu-rich a{ color:#A77B10; text-decoration:underline; }
.eu-rich strong{ color:#011D4B; }
.eu-rich blockquote{ margin:24px 0; padding:14px 24px; border-left:3px solid #FFD231; background:#fff;
  color:#4A463C; font-family:'Newsreader',serif; font-style:italic; font-size:19px; border-radius:0 10px 10px 0; }

/* ============ Bandeau cookies (RGPD) — sobre, branché EUDUC ============ */
.eu-cookie{ position:fixed; left:0; right:0; bottom:0; z-index:90; display:flex; justify-content:center;
  padding:14px 16px; pointer-events:none;
  transform:translateY(120%); opacity:0; transition:transform .38s ease, opacity .38s ease; }
/* L'attribut [hidden] doit l'emporter sur display:flex (sinon le bandeau ne se ferme jamais). */
.eu-cookie[hidden]{ display:none !important; }
/* État de repos VISIBLE stable (pas dépendant d'une animation qui pourrait ne pas se figer). */
.eu-cookie.is-show{ transform:translateY(0); opacity:1; }
.eu-cookie-in{ pointer-events:auto; display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  max-width:1060px; width:100%; background:#011D4B; color:#EAF0FA; border:1px solid #1c3a6b;
  border-top:3px solid #FFD231; border-radius:14px; padding:16px 22px;
  box-shadow:0 24px 60px -20px rgba(1,18,40,.7); }
.eu-cookie-logo{ flex:none; width:38px; height:38px; object-fit:contain; border-radius:8px; }
.eu-cookie-txt{ flex:1; min-width:240px; margin:0; font-size:13.5px; line-height:1.55; color:#C7D3E8; }
.eu-cookie-txt strong{ color:#fff; font-weight:600; }
.eu-cookie-txt a{ color:#FFD231; text-decoration:underline; font-weight:600; }
.eu-cookie-btns{ display:flex; gap:10px; flex-wrap:wrap; }
.eu-cookie-ghost,.eu-cookie-accept{ font-family:inherit; font-size:13.5px; font-weight:700; cursor:pointer;
  border-radius:9px; padding:11px 20px; border:1px solid transparent; transition:transform .12s, background .15s; }
.eu-cookie-ghost{ background:transparent; color:#C7D3E8; border-color:#33508a; }
.eu-cookie-ghost:hover{ background:rgba(255,255,255,.07); color:#fff; }
.eu-cookie-accept{ background:#FFD231; color:#011D4B; box-shadow:0 10px 22px -10px rgba(214,168,16,.8); }
.eu-cookie-accept:hover{ transform:translateY(-1px); }
@media (max-width:640px){
  .eu-cookie{ padding:10px; }
  .eu-cookie-in{ gap:12px; padding:14px 16px; }
  .eu-cookie-logo{ display:none; }
  .eu-cookie-btns{ width:100%; }
  .eu-cookie-ghost,.eu-cookie-accept{ flex:1; }
}
