/*
Theme Name: UTGED
Theme URI: https://example.com/
Author: Université des Techniques de Gestion et de Développement
Description: Thème officiel de l'Université des Techniques de Gestion et de Développement (UTGED). Accueil, université (présentation, pouvoir organisateur, conseil d'administration), facultés, admission, ressources (programmes, espace professeur), galerie et actualités.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: utged
Tags: education, custom-menu, custom-logo, featured-images, translation-ready, accessibility-ready
*/

:root{
  --blue:#0A3C78;        /* bleu principal */
  --blue-2:#0B63B8;      /* bleu secondaire (liens, survols) */
  --sky:#00AFE6;         /* bleu clair du logo */
  --yellow:#FCB51B;      /* jaune du logo */
  --paper:#FAFBFD;
  --mist:#EAF1FA;
  --ink:#102033;
  --muted:#53627A;
  --line:#D5DFEC;
  --serif:"Source Serif 4",Georgia,"Times New Roman",serif;
  --sans:"Public Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --wrap:1180px;
  --radius:4px;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:1.0625rem;line-height:1.6}
img,svg{max-width:100%;display:block}
img{height:auto}
a{color:var(--blue-2);text-underline-offset:3px}
a:hover{color:var(--blue)}
:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 1.25rem}
.skip{position:absolute;left:-999px;top:0;background:var(--yellow);color:#000;padding:.6rem 1rem;z-index:1000}
.skip:focus{left:0}
[id]{scroll-margin-top:120px}

h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.15;color:var(--blue);margin:0 0 .6em;letter-spacing:-.01em}
h1{font-size:clamp(2.2rem,5vw,3.8rem);font-weight:700}
h2{font-size:clamp(1.65rem,3vw,2.3rem)}
h3{font-size:1.3rem}
p{margin:0 0 1em;max-width:68ch}
.lead{font-size:1.2rem;color:var(--muted);max-width:56ch}
.muted{color:var(--muted)}
.eyebrow{font-size:.85rem;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--blue-2);margin:0 0 .8rem}

/* Boutons */
.btn{display:inline-block;padding:.8rem 1.4rem;border-radius:var(--radius);font:inherit;font-weight:600;text-decoration:none;border:2px solid var(--blue);background:var(--blue);color:#fff;cursor:pointer;transition:background .15s,color .15s,border-color .15s}
.btn:hover{background:var(--blue-2);border-color:var(--blue-2);color:#fff}
.btn--ghost{background:transparent;color:var(--blue)}
.btn--ghost:hover{background:var(--blue);border-color:var(--blue);color:#fff}
.btn--yellow{background:var(--yellow);border-color:var(--yellow);color:#14202E}
.btn--yellow:hover{background:#ffc94d;border-color:#ffc94d;color:#14202E}
.btn--light{background:transparent;border-color:#fff;color:#fff}
.btn--light:hover{background:#fff;color:var(--blue);border-color:#fff}
.btn-row{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.6rem}

/* Barre du haut */
.utility{background:#072B58;color:#cfe0f5;font-size:.875rem}
.utility .wrap{display:flex;justify-content:space-between;gap:1rem;padding-top:.45rem;padding-bottom:.45rem}
.utility ul{display:flex;gap:1.25rem;list-style:none;margin:0;padding:0}
.utility a{color:#cfe0f5;text-decoration:none}
.utility a:hover{color:#fff;text-decoration:underline}
.utility .motto{color:var(--yellow);font-weight:600;letter-spacing:.04em}

/* En-tête */
.site-header{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:50}
.site-header .wrap{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;min-height:84px}
.brand{display:flex;align-items:center;gap:.9rem;text-decoration:none;color:var(--blue)}
.brand img{width:60px;height:60px;object-fit:contain}
.brand .custom-logo{width:auto;height:60px}
.brand b{display:block;font-family:var(--serif);font-size:1.6rem;line-height:1;letter-spacing:.02em}
.brand small{display:block;color:var(--muted);font-size:.78rem;line-height:1.3;max-width:230px;margin-top:.2rem}
.nav ul{display:flex;gap:.15rem;list-style:none;margin:0;padding:0}
.nav a{display:block;padding:.6rem .8rem;color:var(--ink);text-decoration:none;font-weight:500;font-size:.98rem;border-bottom:3px solid transparent}
.nav a:hover{border-color:var(--line)}
.nav a[aria-current="page"],.nav .current-menu-item>a,.nav .current-menu-ancestor>a,.nav .current_page_item>a{border-color:var(--yellow);color:var(--blue);font-weight:700}
.nav li{position:relative}
.nav .sub-menu{display:none;position:absolute;left:0;top:100%;min-width:230px;background:#fff;border:1px solid var(--line);flex-direction:column;z-index:60;padding:.4rem 0}
.nav li:hover>.sub-menu,.nav li:focus-within>.sub-menu{display:flex}
.nav-toggle{display:none;background:none;border:2px solid var(--blue);color:var(--blue);padding:.45rem .8rem;border-radius:var(--radius);font:inherit;font-weight:600;cursor:pointer}

/* Héro */
.hero{background:var(--blue);color:#fff;position:relative;overflow:hidden;
  background-image:repeating-linear-gradient(135deg,transparent 0 38px,rgba(255,255,255,.035) 38px 39px)}
.hero .wrap{display:grid;grid-template-columns:1.1fr .9fr;gap:4rem;align-items:center;padding-top:4.5rem;padding-bottom:7rem}
.hero h1{color:#fff;margin-bottom:.5em}
.hero h1 em{font-style:normal;color:var(--yellow)}
.hero .lead{color:#d6e4f6}
.hero-photo{position:relative}
.hero-photo img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);box-shadow:16px 16px 0 var(--yellow)}

/* Sections */
.section{padding:5rem 0}
.section--mist{background:var(--mist)}
.section--blue{background:var(--blue);color:#d6e4f6}
.section--blue h2,.section--blue h3{color:#fff}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:2rem;margin-bottom:2.25rem;flex-wrap:wrap}
.section-head h2{margin:0}
.split{display:grid;grid-template-columns:.9fr 1.1fr;gap:4.5rem;align-items:center}
.split--rev{grid-template-columns:1.1fr .9fr}
.split img{width:100%;border-radius:var(--radius);object-fit:cover}
.split .photo{position:relative}
.split .photo::after{content:"";position:absolute;inset:auto -14px -14px auto;width:60%;height:60%;border:4px solid var(--yellow);border-radius:var(--radius);z-index:-1}
.split .photo img{aspect-ratio:4/5}

/* Piliers */
.pillars{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem;margin-top:2.5rem}
.pillars div{border-top:4px solid var(--yellow);padding-top:1rem}
.pillars h3{margin-bottom:.3em}
.pillars p{margin:0;color:var(--muted)}

/* Page title */
.page-title{background:var(--blue);color:#fff;position:relative;overflow:hidden}
.page-title .wrap{padding-top:3.6rem;padding-bottom:3.2rem;position:relative;z-index:1}
.page-title.has-photo{background-size:cover;background-position:center}
.page-title.has-photo::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(10,60,120,.96) 20%,rgba(10,60,120,.55))}
.page-title h1{color:#fff;font-size:clamp(2rem,4vw,3rem);margin-bottom:.3em}
.page-title .lead{color:#d6e4f6}
.crumbs{font-size:.9rem;color:#b9cfec;margin-bottom:1rem}
.crumbs a{color:#b9cfec}
.subnav{background:#fff;border-bottom:1px solid var(--line);position:sticky;top:84px;z-index:40}
.subnav ul{display:flex;gap:.25rem;list-style:none;margin:0;padding:0;overflow-x:auto}
.subnav a{display:block;padding:.9rem 1.1rem;text-decoration:none;color:var(--ink);font-weight:600;white-space:nowrap;border-bottom:3px solid transparent}
.subnav a:hover{border-color:var(--yellow);color:var(--blue)}

/* Facultés : lignes (accueil) */
.rows{list-style:none;margin:0;padding:0;border-top:2px solid var(--blue);counter-reset:fac}
.rows li{display:grid;grid-template-columns:3.5rem minmax(0,1fr) minmax(0,1.5fr) auto;gap:1.5rem;padding:1.4rem 0;border-bottom:1px solid var(--line);align-items:baseline;counter-increment:fac}
.rows li::before{content:counter(fac,decimal-leading-zero);font-family:var(--serif);font-weight:700;font-size:1.4rem;color:var(--yellow);-webkit-text-stroke:1px #d99700}
.rows h3{margin:0}
.rows p{margin:0;color:var(--muted)}
.rows a.more{font-weight:600;white-space:nowrap}

/* Facultés : cartes (page Facultés) */
.fac-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1.75rem}
.fac-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;overflow:hidden}
.fac-card .top{background:var(--blue);color:var(--yellow);font-family:var(--serif);font-weight:700;font-size:3rem;line-height:1;padding:1.4rem 1.5rem;background-image:repeating-radial-gradient(circle at 100% 100%,transparent 0 24px,rgba(255,255,255,.07) 24px 25px)}
.fac-card .top img{width:100%;height:150px;object-fit:cover;margin:-1.4rem -1.5rem 0;width:calc(100% + 3rem);max-width:none}
.fac-card .body{padding:1.4rem 1.5rem 1.6rem;display:flex;flex-direction:column;flex:1}
.fac-card h2{font-size:1.35rem;margin-bottom:.4em}
.fac-card p{color:var(--muted);flex:1}
.fac-card .levels{font-size:.85rem;font-weight:700;color:var(--blue-2);text-transform:uppercase;letter-spacing:.06em;margin-bottom:.5rem}
.fac-card a.more{font-weight:700}

/* Chiffres */
.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:2rem;margin:2rem 0 0}
.facts div{border-left:3px solid var(--yellow);padding-left:1rem;display:flex;flex-direction:column}
.facts dt{font-size:.95rem;color:#b9cfec;order:2}
.facts dd{margin:0;font-family:var(--serif);font-size:2.6rem;font-weight:700;color:#fff;line-height:1.1}

/* Admission : trois voies */
.trio{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.trio a{display:block;background:#fff;border:1px solid var(--line);border-top:5px solid var(--yellow);border-radius:var(--radius);padding:1.6rem;text-decoration:none;color:var(--ink);transition:transform .15s,box-shadow .15s}
.trio a:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(10,60,120,.12)}
.trio h3{margin-bottom:.3em}
.trio p{color:var(--muted);margin-bottom:.8rem}
.trio span{font-weight:700;color:var(--blue-2)}

.trio--lift{margin-top:-3.6rem;position:relative;z-index:2}
.trio--lift a{box-shadow:0 10px 30px rgba(10,60,120,.12)}
.trio.duo{grid-template-columns:1fr 1fr}
.gallery--five a:nth-child(4){grid-row:auto}
.gallery--six{grid-template-columns:repeat(3,1fr)}
.gallery--six a:nth-child(4){grid-row:auto}

/* Actualités */
.news{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}
.news article{display:flex;flex-direction:column}
.news .thumb{display:block;overflow:hidden;border-radius:var(--radius);margin-bottom:1rem}
.news .thumb img{width:100%;aspect-ratio:3/2;object-fit:cover;transition:transform .4s}
.news .thumb:hover img{transform:scale(1.04)}
.news time,.meta{font-size:.9rem;color:var(--muted);display:block;margin-bottom:.35rem}
.news h3{font-size:1.3rem}
.news h3 a{color:var(--blue);text-decoration:none}
.news h3 a:hover{text-decoration:underline}
.news p{color:var(--muted)}
.tag{display:inline-block;font-size:.8rem;font-weight:700;background:var(--mist);color:var(--blue);padding:.1rem .6rem;border-radius:99px;margin-bottom:.5rem}

/* Galerie */
.gallery{display:grid;grid-template-columns:repeat(4,1fr);grid-auto-rows:210px;gap:.8rem}
.gallery a{position:relative;overflow:hidden;border-radius:var(--radius);display:block;background:var(--mist)}
.gallery a:nth-child(1){grid-column:span 2;grid-row:span 2}
.gallery a:nth-child(4){grid-row:span 2}
.gallery img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.gallery a:hover img{transform:scale(1.05)}
.gallery figcaption,.gallery .cap{position:absolute;left:0;right:0;bottom:0;padding:1.4rem .9rem .7rem;color:#fff;font-size:.9rem;background:linear-gradient(transparent,rgba(7,43,88,.85))}
dialog.lightbox{border:0;padding:0;background:transparent;max-width:min(94vw,1100px);max-height:92vh;overflow:visible}
dialog.lightbox::backdrop{background:rgba(7,25,50,.88)}
dialog.lightbox img{max-height:82vh;width:auto;max-width:100%;margin:0 auto;border-radius:var(--radius)}
dialog.lightbox p{color:#fff;text-align:center;margin:.8rem auto 0}
dialog.lightbox button{position:absolute;top:-2.6rem;right:0;background:var(--yellow);border:0;border-radius:var(--radius);padding:.4rem .9rem;font:inherit;font-weight:700;cursor:pointer}

/* Personnes (pouvoir organisateur, CA) */
.people{display:grid;grid-template-columns:repeat(3,1fr);gap:1.5rem}
.person{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.5rem;display:grid;grid-template-columns:72px 1fr;gap:1rem;align-items:center}
.person .avatar{width:72px;height:72px;border-radius:50%;background:var(--blue);color:var(--yellow);display:grid;place-items:center;font-family:var(--serif);font-weight:700;font-size:1.5rem;overflow:hidden}
.person .avatar img{width:100%;height:100%;object-fit:cover}
.person h3{font-size:1.1rem;margin:0}
.person p{margin:.15rem 0 0;color:var(--muted);font-size:.95rem}
.person .role{color:var(--blue-2);font-weight:700}

/* Admission : étapes, documents, FAQ */
.steps{counter-reset:step;list-style:none;margin:0;padding:0}
.steps li{counter-increment:step;position:relative;padding:0 0 1.6rem 3.8rem}
.steps li::before{content:counter(step);position:absolute;left:0;top:0;width:2.5rem;height:2.5rem;border-radius:50%;background:var(--blue);color:var(--yellow);display:grid;place-items:center;font-family:var(--serif);font-weight:700}
.steps li::after{content:"";position:absolute;left:1.2rem;top:2.7rem;bottom:.2rem;width:2px;background:var(--line)}
.steps li:last-child::after{display:none}
.steps h3{font-size:1.1rem;margin-bottom:.15em}
.steps p{margin:0;color:var(--muted)}
.check{list-style:none;padding:0;margin:0}
.check li{padding:.5rem 0 .5rem 1.9rem;position:relative;border-bottom:1px solid var(--line)}
.check li::before{content:"";position:absolute;left:.3rem;top:.85rem;width:.5rem;height:.9rem;border:solid var(--blue-2);border-width:0 3px 3px 0;transform:rotate(45deg) scale(.8)}
.two-col{display:grid;grid-template-columns:1.2fr .8fr;gap:4rem}
.box{background:var(--mist);border-left:5px solid var(--yellow);border-radius:var(--radius);padding:1.4rem 1.6rem}
.box h3{font-size:1.1rem}
details{border-bottom:1px solid var(--line);padding:1rem 0}
details:first-of-type{border-top:2px solid var(--blue)}
summary{cursor:pointer;font-weight:600;color:var(--blue)}
details p{margin:.7rem 0 0;color:var(--muted)}

/* Ressources */
.programs{list-style:none;margin:0;padding:0;border-top:2px solid var(--blue)}
.programs li{display:grid;grid-template-columns:1fr auto;gap:1.5rem;padding:1.1rem 0;border-bottom:1px solid var(--line);align-items:center}
.programs h3{margin:0;font-size:1.15rem}
.programs p{margin:.1rem 0 0;color:var(--muted);font-size:.95rem}
.pending{color:var(--muted);font-size:.95rem}
.login-box{background:#fff;border:1px solid var(--line);border-top:5px solid var(--yellow);border-radius:var(--radius);padding:2rem;max-width:460px}
.login-box form p{margin:0 0 1rem;max-width:none}
.login-box label{display:block;font-weight:600;margin-bottom:.3rem}
.login-box input[type=text],.login-box input[type=password]{width:100%;font:inherit;padding:.75rem .9rem;border:2px solid var(--line);border-radius:var(--radius)}
.login-box input[type=submit]{background:var(--blue);color:#fff;border:2px solid var(--blue);padding:.8rem 1.4rem;border-radius:var(--radius);font:inherit;font-weight:600;cursor:pointer}
.login-box input[type=submit]:hover{background:var(--blue-2);border-color:var(--blue-2)}
.login-box .login-remember label{font-weight:400}
.notice{background:#e8f3fc;border-left:4px solid var(--blue-2);padding:1rem 1.2rem;border-radius:var(--radius)}

/* Bandeau d'appel */
.cta .wrap{display:flex;justify-content:space-between;align-items:center;gap:2rem;flex-wrap:wrap}
.cta h2{margin:0 0 .3em}
.cta p{margin:0}

/* Pied de page */
.site-footer{background:#072B58;color:#bcd0ea;padding:3.5rem 0 1.5rem;font-size:.97rem;border-top:6px solid var(--yellow)}
.site-footer .grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:2.5rem}
.site-footer h2{color:#fff;font-size:1.05rem;font-family:var(--sans);margin-bottom:.8rem}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{margin:.35rem 0}
.site-footer a{color:#bcd0ea;text-decoration:none}
.site-footer a:hover{color:#fff;text-decoration:underline}
.site-footer .motto{color:var(--yellow);font-weight:700;letter-spacing:.05em;margin-top:.8rem}
.site-footer .legal{border-top:1px solid rgba(255,255,255,.15);margin-top:2.5rem;padding-top:1.2rem;display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.875rem}

/* Contenu WordPress */
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}
.screen-reader-text:focus{background:#fff;clip:auto!important;clip-path:none;display:block;height:auto;left:5px;top:5px;width:auto;padding:1rem;z-index:100000}
body.admin-bar .site-header{top:32px}
body.admin-bar .subnav{top:116px}
@media (max-width:782px){body.admin-bar .site-header{top:46px}}
.entry-content{max-width:760px}
.entry-content h2{margin-top:1.8em}
.entry-content img{border-radius:var(--radius)}
.entry-content figure{margin:1.5em 0}
.entry-content figcaption,.wp-caption-text{font-size:.9rem;color:var(--muted)}
.entry-content table{border-collapse:collapse;width:100%}
.entry-content th,.entry-content td{border-bottom:1px solid var(--line);padding:.6rem;text-align:left}
.entry-content blockquote{border-left:4px solid var(--yellow);margin:1.5em 0;padding:.2em 1.2em;color:var(--muted);font-family:var(--serif);font-size:1.15rem}
.wp-block-button__link{background:var(--blue)!important;border-radius:var(--radius)!important;font-weight:600}
.alignleft{float:left;margin:0 1.5rem 1rem 0}.alignright{float:right;margin:0 0 1rem 1.5rem}.aligncenter{margin-left:auto;margin-right:auto}
.pagination{margin-top:2.5rem}
.pagination .nav-links,.pagination ul{display:flex;gap:.5rem;flex-wrap:wrap;list-style:none;padding:0;margin:0}
.pagination .page-numbers{display:block;padding:.4rem .9rem;border:2px solid var(--blue);border-radius:var(--radius);text-decoration:none;font-weight:600}
.pagination .current{background:var(--blue);color:#fff}
.post-thumb img{width:100%;border-radius:var(--radius);margin-bottom:1.2rem}
.search-form{display:flex;gap:.5rem;max-width:520px}
.search-form input{flex:1;font:inherit;padding:.75rem .9rem;border:2px solid var(--line);border-radius:var(--radius)}

@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.hero .wrap>*{animation:rise .7s ease-out both}
.hero .wrap>*:nth-child(2){animation-delay:.12s}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media (max-width:1020px){
  .hero .wrap,.split,.split--rev,.two-col{grid-template-columns:1fr;gap:2.5rem}
  .hero .wrap{padding-bottom:6rem}
  .hero-photo{max-width:560px}
  .fac-grid,.people{grid-template-columns:1fr 1fr}
  .news,.trio,.trio.duo,.pillars{grid-template-columns:1fr}
  .trio--lift{margin-top:-2.5rem}
  .facts{grid-template-columns:repeat(2,1fr)}
  .rows li{grid-template-columns:3rem 1fr;gap:.4rem 1rem}
  .rows li p,.rows li a.more{grid-column:2}
  .gallery,.gallery--six{grid-template-columns:repeat(2,1fr)}
  .site-footer .grid{grid-template-columns:1fr 1fr}
}
@media (max-width:860px){
  .nav-toggle{display:block}
  .nav{display:none;position:absolute;left:0;right:0;top:100%;background:#fff;border-bottom:1px solid var(--line);padding:.5rem 1.25rem 1rem}
  .nav.open{display:block}
  .nav ul{flex-direction:column}
  .brand small{display:none}
  .utility .motto{display:none}
}
@media (max-width:640px){
  .fac-grid,.people{grid-template-columns:1fr}
  .gallery,.gallery--six{grid-template-columns:1fr;grid-auto-rows:220px}
  .gallery a:nth-child(n){grid-column:auto;grid-row:auto}
  .site-footer .grid{grid-template-columns:1fr}
  .section{padding:3.4rem 0}
  .programs li{grid-template-columns:1fr}
  .subnav{position:static}
}
@media print{.utility,.site-header,.site-footer,.cta,.subnav{display:none}}
