:root{
  --blue:#002958;
  --blue-2:#004080;
  --gold:#D4AF37;
  --neutral:#FAF9F6;
  --footer:#2e2e2e;
  --radius:22px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--neutral);color:var(--blue);font-family:'Source Sans 3','Source Sans Pro',system-ui,sans-serif;line-height:1.65;-webkit-font-smoothing:antialiased}
a{color:inherit}
img,svg{max-width:100%;display:block}
button,input{font:inherit}
button{color:inherit}
.shell{width:min(1180px,calc(100% - 40px));margin-inline:auto}
.narrow{max-width:860px;text-align:center}
.section{padding:104px 0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;left:16px;top:-80px;z-index:9999;background:var(--neutral);color:var(--blue);padding:10px 14px;border:2px solid var(--gold);border-radius:10px;text-decoration:none;transition:top .2s}
.skip-link:focus{top:16px}
:focus-visible{outline:3px solid var(--gold);outline-offset:4px}

/* ==================== HEADER ==================== */
.mathesis-header{position:fixed;z-index:1000;top:0;left:0;width:100%;height:112px;color:var(--neutral);background:transparent;border-bottom:1px solid transparent;transition:height .22s ease,background .22s ease,box-shadow .22s ease,border-color .22s ease}
.mathesis-header.is-scrolled{height:66px;background:var(--blue);border-bottom-color:var(--gold);box-shadow:0 8px 24px rgba(0,41,88,.18)}
.mathesis-header__inner{width:min(1180px,calc(100% - 40px));height:100%;margin:0 auto;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:42px}
.mathesis-header__logo{display:inline-block;margin:0;color:var(--gold);font-family:'Playfair Display',serif;font-size:2.45rem;font-weight:600;line-height:1;letter-spacing:.02em;text-decoration:none;white-space:nowrap;transition:font-size .22s ease}
.mathesis-header__logo span{color:var(--neutral);font-style:italic}
.mathesis-header.is-scrolled .mathesis-header__logo{font-size:1.75rem}
.mathesis-header__nav{display:flex;align-items:center;justify-content:center;gap:34px}
.mathesis-header__link,.mathesis-header__dropdown-trigger{position:relative;padding:12px 0;border:0;color:var(--neutral);background:transparent;font-family:Poppins,sans-serif;font-size:.88rem;font-weight:500;line-height:1;text-decoration:none;cursor:pointer;opacity:.82;transition:color .18s ease,opacity .18s ease}
.mathesis-header__link:hover,.mathesis-header__link:focus-visible,.mathesis-header__dropdown-trigger:hover,.mathesis-header__dropdown-trigger:focus-visible{color:var(--gold);opacity:1}
.mathesis-header__link::after{content:"";position:absolute;left:50%;bottom:4px;width:0;height:1px;background:var(--gold);transform:translateX(-50%);transition:width .18s ease}
.mathesis-header__link:hover::after,.mathesis-header__link:focus-visible::after{width:100%}
.mathesis-header__dropdown{position:relative}
.mathesis-header__dropdown-trigger{display:flex;align-items:center;gap:7px}
.mathesis-header__chevron{width:10px;height:7px;transition:transform .18s ease}
.mathesis-header__dropdown:hover .mathesis-header__chevron,.mathesis-header__dropdown:focus-within .mathesis-header__chevron,.mathesis-header__dropdown.is-open .mathesis-header__chevron{transform:rotate(180deg)}
.mathesis-header__dropdown-menu{position:absolute;top:100%;left:50%;z-index:1100;width:570px;padding:28px;display:grid;grid-template-columns:1fr 1fr;gap:20px 30px;background:var(--neutral);border:1px solid var(--gold);border-radius:18px;box-shadow:0 22px 55px rgba(0,41,88,.18);color:var(--blue);opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,-8px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease}
.mathesis-header__dropdown:hover .mathesis-header__dropdown-menu,.mathesis-header__dropdown:focus-within .mathesis-header__dropdown-menu,.mathesis-header__dropdown.is-open .mathesis-header__dropdown-menu{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0)}
.mathesis-header__dropdown-section{display:flex;flex-direction:column;gap:4px}
.mathesis-header__dropdown-title{margin:0 0 10px;color:var(--gold);font-family:Poppins,sans-serif;font-size:.72rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase}
.mathesis-header__dropdown-section a{display:block;padding:10px 11px;border-radius:10px;color:var(--blue);text-decoration:none;transition:background .16s ease,transform .16s ease}
.mathesis-header__dropdown-section a:hover,.mathesis-header__dropdown-section a:focus-visible{background:rgba(212,175,55,.12);transform:translateX(3px)}
.mathesis-header__dropdown-section span{display:block;font-family:Poppins,sans-serif;font-size:.87rem;font-weight:600}
.mathesis-header__dropdown-section small{display:block;margin-top:2px;color:var(--blue);font-size:.78rem;line-height:1.35;opacity:.62}
.mathesis-header__dropdown-all{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;margin-top:5px;padding:16px 12px 3px;border-top:1px solid var(--gold);color:var(--blue);font-family:Poppins,sans-serif;font-size:.82rem;font-weight:600;text-decoration:none;transition:color .16s ease}
.mathesis-header__dropdown-all span{color:var(--gold);font-size:1.2rem}
.mathesis-header__dropdown-all:hover{color:var(--gold)}
.mathesis-header__actions{display:flex;align-items:center;gap:20px}
.mathesis-header__login{color:var(--neutral);font-family:Poppins,sans-serif;font-size:.86rem;font-weight:500;text-decoration:none;opacity:.84;transition:color .18s ease,opacity .18s ease}
.mathesis-header__login:hover{color:var(--gold);opacity:1}
.mathesis-header__cta{min-height:44px;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--gold);border-radius:11px;background:var(--gold);color:var(--blue);font-family:Poppins,sans-serif;font-size:.83rem;font-weight:600;text-decoration:none;transition:transform .18s ease,background .18s ease,color .18s ease}
.mathesis-header__cta:hover,.mathesis-header__cta:focus-visible{transform:translateY(-2px);background:var(--neutral);color:var(--blue)}
.mathesis-header.is-scrolled .mathesis-header__cta{min-height:38px;padding-inline:17px}
.mathesis-header__mobile-toggle{display:none;width:42px;height:42px;padding:8px;border:0;background:transparent;cursor:pointer}
.mathesis-header__mobile-toggle span{display:block;width:24px;height:2px;margin:5px auto;background:var(--neutral);transition:transform .18s ease,opacity .18s ease}
.mathesis-header__mobile-menu{display:none}

/* ==================== BUTTONS / TYPE ==================== */
.button{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 23px;border-radius:12px;font-family:Poppins,sans-serif;font-size:.9rem;font-weight:600;text-decoration:none;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease,border-color .18s ease}
.button:hover{transform:translateY(-2px)}
.button-gold{background:var(--gold);color:var(--blue);border:1px solid var(--gold);box-shadow:0 12px 26px rgba(212,175,55,.2)}
.button-gold:hover{background:var(--neutral);color:var(--blue);box-shadow:0 16px 34px rgba(212,175,55,.24)}
.button-ghost{border:1px solid rgba(250,249,246,.28);color:var(--neutral);background:transparent}
.button-ghost:hover{background:rgba(250,249,246,.08);border-color:var(--neutral)}
.section-label,.eyebrow{margin:0 0 18px;font-family:Poppins,sans-serif;font-size:.75rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;color:var(--gold)}
h2{margin:0;font-family:'Playfair Display',serif;font-size:clamp(2.35rem,4vw,4rem);line-height:1.08;letter-spacing:-.025em;color:var(--blue)}
.section-intro{max-width:730px;margin:24px auto 0;color:var(--blue);font-size:1.13rem;opacity:.68}
.light{color:var(--gold)}
.centered{justify-content:center}

/* ==================== FOOTER ==================== */
.mathesis-footer{width:100%;margin:0;background:var(--footer);color:var(--neutral);border-top:3px solid var(--gold);padding:64px 24px 24px}
.mathesis-footer a{color:var(--neutral);text-decoration:none}
.mathesis-footer__main{width:min(1160px,100%);margin:0 auto;display:grid;grid-template-columns:1.6fr 1fr 1fr 1.1fr;gap:64px}
.mathesis-footer__brand{max-width:300px}
.mathesis-footer__logo{display:inline-block;margin:0 0 24px;font-family:'Playfair Display',serif;font-size:2rem;font-weight:700;line-height:1;letter-spacing:.02em;color:var(--gold)!important}
.mathesis-footer__logo span{color:var(--neutral);font-style:italic}
.mathesis-footer__motto{margin:0 0 18px;font-family:'Playfair Display',serif;font-size:1.25rem;font-weight:700;line-height:1.45;color:var(--neutral)}
.mathesis-footer__description{max-width:290px;margin:0;font-size:.95rem;line-height:1.65;color:var(--neutral);opacity:.78}
.mathesis-footer__column{display:flex;flex-direction:column;align-items:flex-start;gap:13px}
.mathesis-footer__column h2{margin:0 0 9px;font-family:Poppins,sans-serif;font-size:.78rem;font-weight:600;line-height:1.4;letter-spacing:.12em;text-transform:uppercase;color:var(--gold)}
.mathesis-footer__column>a{position:relative;font-size:.95rem;line-height:1.4;color:var(--neutral);transition:color .18s ease,transform .18s ease}
.mathesis-footer__column>a:hover,.mathesis-footer__column>a:focus-visible{color:var(--gold);transform:translateX(3px)}
.mathesis-footer__start{color:var(--gold)!important;font-weight:600;margin-top:3px}
.mathesis-footer__social-block{margin-top:24px}
.mathesis-footer__social-block p{margin:0 0 12px;font-family:Poppins,sans-serif;font-size:.75rem;font-weight:600;line-height:1.4;letter-spacing:.08em;text-transform:uppercase;color:var(--gold)}
.mathesis-footer__socials{display:flex;align-items:center;gap:10px}
.mathesis-footer__social{width:38px;height:38px;display:flex;align-items:center;justify-content:center;padding:0;color:var(--neutral)!important;border:1px solid var(--gold);border-radius:50%;transition:color .18s ease,transform .18s ease,background .18s ease}
.mathesis-footer__social svg{width:18px;height:18px}
.mathesis-footer__social:hover,.mathesis-footer__social:focus-visible{color:var(--gold)!important;background:rgba(212,175,55,.08);transform:translateY(-2px)}
.mathesis-footer__bottom{width:min(1160px,100%);margin:56px auto 0;padding:22px 0 0;border-top:1px solid var(--gold);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:32px;font-size:.82rem;color:var(--neutral)}
.mathesis-footer__bottom p{margin:0}
.mathesis-footer__legal{display:flex;align-items:center;justify-content:center;gap:22px}
.mathesis-footer__legal a{color:var(--neutral);opacity:.78;transition:color .18s ease,opacity .18s ease}
.mathesis-footer__legal a:hover,.mathesis-footer__legal a:focus-visible{color:var(--gold);opacity:1}
.mathesis-footer__signature{justify-self:end;font-family:'Playfair Display',serif;font-style:italic;color:var(--gold)}

/* ==================== RESPONSIVE HEADER/FOOTER ==================== */
@media (max-width:900px){
  .mathesis-header{height:76px;background:var(--blue)}
  .mathesis-header.is-scrolled{height:64px}
  .mathesis-header__inner{grid-template-columns:1fr auto;width:min(100% - 32px,1180px)}
  .mathesis-header__logo{font-size:1.9rem}
  .mathesis-header__nav,.mathesis-header__actions{display:none}
  .mathesis-header__mobile-toggle{display:block}
  .mathesis-header__mobile-menu{position:absolute;top:100%;left:0;width:100%;padding:18px 20px 25px;background:var(--blue);border-top:1px solid var(--gold);display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-8px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease}
  .mathesis-header.mobile-open .mathesis-header__mobile-menu{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
  .mathesis-header__mobile-menu>a,.mathesis-header__mobile-parcours{width:100%;padding:14px 4px;border:0;border-bottom:1px solid rgba(250,249,246,.16);background:transparent;color:var(--neutral);font-family:Poppins,sans-serif;font-size:.92rem;text-align:left;text-decoration:none}
  .mathesis-header__mobile-parcours{display:flex;justify-content:space-between;align-items:center;cursor:pointer}
  .mathesis-header__mobile-submenu{display:none;padding:8px 0 13px 16px}
  .mathesis-header__mobile-submenu.is-open{display:flex;flex-direction:column}
  .mathesis-header__mobile-submenu a{padding:8px 0;color:var(--neutral);font-size:.9rem;text-decoration:none;opacity:.78}
  .mathesis-header__mobile-submenu a:last-child{margin-top:8px;color:var(--gold);font-weight:600;opacity:1}
  .mathesis-header__mobile-actions{display:flex;flex-direction:column;gap:10px;padding-top:22px}
  .mathesis-header__mobile-actions a{display:flex;min-height:44px;align-items:center;justify-content:center;border:1px solid var(--gold);border-radius:10px;color:var(--neutral);font-family:Poppins,sans-serif;font-size:.88rem;text-decoration:none}
  .mathesis-header__mobile-actions .mathesis-header__mobile-cta{background:var(--gold);color:var(--blue)}
  .mathesis-footer{padding-top:52px}
  .mathesis-footer__main{grid-template-columns:1.5fr 1fr 1fr;gap:48px 36px}
  .mathesis-footer__account{grid-column:2/4}
  .mathesis-footer__bottom{grid-template-columns:1fr auto}
  .mathesis-footer__signature{display:none}
}
@media (max-width:650px){
  .shell{width:min(100% - 28px,1180px)}
  .section{padding:72px 0}
  .mathesis-footer{padding:44px 22px 24px}
  .mathesis-footer__main{grid-template-columns:1fr 1fr;gap:42px 28px}
  .mathesis-footer__brand{grid-column:1/-1;max-width:360px}
  .mathesis-footer__account{grid-column:auto}
  .mathesis-footer__bottom{margin-top:44px;grid-template-columns:1fr;gap:18px}
  .mathesis-footer__legal{justify-content:flex-start;flex-wrap:wrap;gap:10px 18px}
}
@media (max-width:520px){
  .mathesis-header{height:70px}
  .mathesis-header__inner{width:calc(100% - 28px)}
  .mathesis-header__logo{font-size:1.75rem}
}
@media (max-width:440px){
  .mathesis-footer{padding-left:20px;padding-right:20px}
  .mathesis-footer__main{grid-template-columns:1fr;gap:36px}
  .mathesis-footer__brand,.mathesis-footer__account{grid-column:auto}
  .mathesis-footer__logo{font-size:1.8rem}
}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* Liens de compte partagés (desktop, mobile, pied de page). */
.mathesis-auth-logout{border:0;background:transparent;color:var(--neutral);font:500 .78rem Poppins,sans-serif;cursor:pointer;padding:8px 0;opacity:.85}
.mathesis-auth-logout:hover,.mathesis-auth-logout:focus-visible{color:var(--gold);opacity:1;text-decoration:underline}
.mathesis-auth-logout--mobile{display:block;width:100%;text-align:left;padding:12px 0;font-size:inherit}
.mathesis-auth-logout--footer{display:block;text-align:left;color:inherit;font-size:inherit}
