/* =====================================================================
   SYPHAX — Styles des templates de pages CMS (web/pages/*.php)
   Chargé globalement par le layout web. Classes communes (.cms-*) +
   spécifiques par template (.tpl-*).
   ===================================================================== */

/* ═══ HERO commun ═══ */
.cms-hero { position: relative; padding: 70px 0 90px; color: #fff; overflow: hidden;
    background: linear-gradient(135deg, var(--syphax-bordeaux, #1E3A8A) 0%, var(--syphax-bordeaux-dark, #122657) 100%); }
.cms-hero--sm { padding: 54px 0 64px; }
.cms-hero-deco { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(circle at 80% 20%, rgba(212,150,11,0.18) 0%, transparent 50%),
                radial-gradient(circle at 10% 100%, rgba(255,255,255,0.08) 0%, transparent 50%); }
.cms-hero-inner { position: relative; z-index: 1; }
.cms-page-title { font-size: 42px; font-weight: 800; line-height: 1.15; margin: 0 0 14px; max-width: 820px; letter-spacing: -0.5px; }
.cms-page-subtitle { font-size: 19px; line-height: 1.5; opacity: 0.92; max-width: 720px; margin: 0; }
@media (max-width: 768px) { .cms-hero { padding: 50px 0 60px; } .cms-page-title { font-size: 30px; } .cms-page-subtitle { font-size: 16px; } }

/* ═══ CONTENU commun ═══ */
.cms-content-wrap { background: #fff; padding: 64px 0 90px; }
.cms-content { max-width: 820px; margin: 0 auto; font-size: 17px; line-height: 1.75; color: var(--syphax-gray-800, #3D3D3D); }
.cms-content--large { max-width: 1120px; }
.cms-content--narrow { max-width: 620px; }
.cms-content p { margin: 0 0 22px; }
.cms-content h2 { font-size: 28px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); margin: 44px 0 18px; padding-left: 16px; border-left: 4px solid var(--syphax-or, #D4960B); line-height: 1.25; }
.cms-content h2:first-child { margin-top: 0; }
.cms-content h3 { font-size: 21px; font-weight: 700; margin: 32px 0 12px; }
.cms-content ul, .cms-content ol { margin: 0 0 22px; padding-left: 22px; }
.cms-content li { padding: 4px 0; }
.cms-content a { color: var(--syphax-bordeaux, #1E3A8A); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.cms-content table { width: 100%; border-collapse: collapse; margin: 24px 0; border: 1px solid #E5E7EB; border-radius: 8px; overflow: hidden; font-size: 15px; }
.cms-content th { background: var(--syphax-bordeaux, #1E3A8A); color: #fff; padding: 12px 16px; text-align: left; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.cms-content td { padding: 12px 16px; border-top: 1px solid #F3F4F6; }
.cms-content tbody tr:nth-child(even) { background: #FAFBFC; }
.cms-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.cms-empty { text-align: center; padding: 50px; color: var(--syphax-gray-500, #9B9B9B); font-style: italic; }

/* Section wrapper générique pour les templates dynamiques */
.tpl-section { background: #fff; padding: 60px 0 90px; }
.tpl-intro { max-width: 820px; margin: 0 auto 44px; font-size: 17px; line-height: 1.75; color: var(--syphax-gray-800, #3D3D3D); }
.tpl-group { margin-bottom: 52px; }
.tpl-group-title { font-size: 24px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); margin: 0 0 24px; padding-left: 16px; border-left: 4px solid var(--syphax-or, #D4960B); }

/* ═══ CTA commun ═══ */
.cms-cta-block { max-width: 820px; margin: 20px auto 0; color: #fff; border-radius: 16px; padding: 32px; display: flex; align-items: center; gap: 24px;
    box-shadow: 0 8px 24px rgba(212,150,11,0.25); background: linear-gradient(135deg, var(--syphax-or, #D4960B) 0%, var(--syphax-or-dark, #A87608) 100%); }
.cms-cta-icon { flex-shrink: 0; width: 64px; height: 64px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.cms-cta-body { flex: 1; } .cms-cta-body h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; } .cms-cta-body p { margin: 0; opacity: .95; font-size: 14px; }
.cms-cta-btn { flex-shrink: 0; background: #fff; color: var(--syphax-or-dark, #A87608); padding: 14px 26px; border-radius: 8px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: all .2s; }
.cms-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); color: var(--syphax-bordeaux, #1E3A8A); }
@media (max-width: 640px) { .cms-cta-block { flex-direction: column; text-align: center; padding: 28px 20px; } }

/* ═══ ÉQUIPE (.team-*) ═══ */
.team-group { margin-bottom: 52px; }
.team-group-title { font-size: 24px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); margin: 0 0 24px; padding-left: 16px; border-left: 4px solid var(--syphax-or, #D4960B); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 24px; }
.team-card { background: #fff; border: 1px solid #ECECEC; border-radius: 16px; padding: 26px 20px; text-align: center; transition: transform .2s, box-shadow .2s, border-color .2s; }
.team-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(30,58,138,0.12); border-color: var(--syphax-or, #D4960B); }
.team-photo { width: 104px; height: 104px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden; background: var(--syphax-bordeaux-05, #EBF0FB); display: flex; align-items: center; justify-content: center; border: 3px solid var(--syphax-or-bg, #FDF6E8); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-initials { font-size: 34px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); }
.team-name { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.team-role { font-size: 14px; font-weight: 600; color: var(--syphax-or-dark, #A87608); margin: 0 0 6px; }
.team-dept { font-size: 12px; color: var(--syphax-gray-600, #6B6B6B); margin: 0 0 10px; }
.team-bio { font-size: 13px; line-height: 1.55; color: var(--syphax-gray-700, #4D4D4D); margin: 0 0 12px; }
.team-links { display: flex; justify-content: center; gap: 10px; }
.team-links a { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--syphax-bordeaux-05, #EBF0FB); color: var(--syphax-bordeaux, #1E3A8A); text-decoration: none; transition: all .18s; }
.team-links a:hover { background: var(--syphax-bordeaux, #1E3A8A); color: #fff; }

/* ═══ CARTES génériques (programmes, offres) ═══ */
.tpl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.tpl-card { background: #fff; border: 1px solid #ECECEC; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tpl-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(30,58,138,0.13); }
.tpl-card-img { height: 170px; background: var(--syphax-bordeaux-05, #EBF0FB); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.tpl-card-img img { width: 100%; height: 100%; object-fit: cover; }
.tpl-card-img i { font-size: 48px; color: var(--syphax-bordeaux, #1E3A8A); opacity: .55; }
.tpl-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.tpl-card-title { font-size: 19px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); margin: 0 0 6px; }
.tpl-card-sub { font-size: 13px; color: var(--syphax-or-dark, #A87608); font-weight: 600; margin: 0 0 10px; }
.tpl-card-text { font-size: 14px; line-height: 1.6; color: var(--syphax-gray-700, #4D4D4D); margin: 0 0 14px; flex: 1; }
.tpl-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tpl-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--syphax-bordeaux-05, #EBF0FB); color: var(--syphax-bordeaux, #1E3A8A); }
.tpl-badge.or { background: var(--syphax-or-bg, #FDF6E8); color: var(--syphax-or-dark, #A87608); }
.tpl-card-link { align-self: flex-start; margin-top: auto; font-weight: 700; color: var(--syphax-bordeaux, #1E3A8A); text-decoration: none; font-size: 14px; }
.tpl-card-link:hover { color: var(--syphax-or-dark, #A87608); }

/* ═══ FAQ (accordéon) ═══ */
.faq-cat { margin-bottom: 40px; }
.faq-cat-title { font-size: 22px; font-weight: 800; color: var(--syphax-bordeaux, #1E3A8A); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.faq-item { border: 1px solid #ECECEC; border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 22px; font-size: 16px; font-weight: 700; color: var(--syphax-noir, #1A1A1A); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-family: inherit; }
.faq-q:hover { color: var(--syphax-bordeaux, #1E3A8A); }
.faq-q .chev { transition: transform .25s; color: var(--syphax-or, #D4960B); flex-shrink: 0; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 22px 20px; font-size: 15px; line-height: 1.7; color: var(--syphax-gray-700, #4D4D4D); }

/* ═══ TÉMOIGNAGES ═══ */
.tmg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.tmg-card { background: #fff; border: 1px solid #ECECEC; border-radius: 16px; padding: 28px; position: relative; }
.tmg-card::before { content: '\201C'; position: absolute; top: 10px; right: 22px; font-size: 64px; font-family: Georgia, serif; color: var(--syphax-or, #D4960B); opacity: .2; line-height: 1; }
.tmg-stars { color: var(--syphax-or, #D4960B); font-size: 15px; margin-bottom: 12px; }
.tmg-text { font-size: 15px; line-height: 1.7; color: var(--syphax-gray-800, #3D3D3D); font-style: italic; margin: 0 0 18px; }
.tmg-author { display: flex; align-items: center; gap: 12px; }
.tmg-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--syphax-bordeaux-05, #EBF0FB); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tmg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tmg-avatar i { color: var(--syphax-bordeaux, #1E3A8A); font-size: 22px; }
.tmg-name { font-weight: 700; font-size: 15px; }
.tmg-role { font-size: 12px; color: var(--syphax-gray-600, #6B6B6B); }

/* ═══ GALERIE ═══ */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gal-item { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; background: var(--syphax-bordeaux-05, #EBF0FB); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gal-item:hover img { transform: scale(1.06); }
.gal-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }

/* ═══ VISITE VIRTUELLE ═══ */
.vis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.vis-card { border: 1px solid #ECECEC; border-radius: 16px; overflow: hidden; background: #fff; }
.vis-media { aspect-ratio: 16/9; background: #000; }
.vis-media iframe, .vis-media img, .vis-media video { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.vis-body { padding: 18px 20px; }
.vis-title { font-size: 17px; font-weight: 700; margin: 0 0 6px; color: var(--syphax-bordeaux, #1E3A8A); }
.vis-lieu { font-size: 13px; color: var(--syphax-gray-600, #6B6B6B); margin: 0 0 8px; }
.vis-desc { font-size: 14px; line-height: 1.6; color: var(--syphax-gray-700, #4D4D4D); margin: 0; }

/* ═══ ADMISSION (étapes) ═══ */
.adm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 10px 0 30px; }
.adm-step { background: #fff; border: 1px solid #ECECEC; border-radius: 14px; padding: 26px 22px; position: relative; }
.adm-step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--syphax-bordeaux, #1E3A8A); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.adm-step h3 { font-size: 17px; font-weight: 700; color: var(--syphax-bordeaux, #1E3A8A); margin: 0 0 8px; }
.adm-step p { font-size: 14px; line-height: 1.6; color: var(--syphax-gray-700, #4D4D4D); margin: 0; }

/* ═══ CONTACT ═══ */
.ct-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.ct-info { display: flex; flex-direction: column; gap: 16px; }
.ct-info-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid #ECECEC; border-radius: 12px; background: #fff; }
.ct-info-item i { font-size: 22px; color: var(--syphax-or, #D4960B); flex-shrink: 0; margin-top: 2px; }
.ct-info-item .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--syphax-gray-600, #6B6B6B); margin: 0 0 3px; }
.ct-info-item .val { font-size: 15px; font-weight: 600; color: var(--syphax-noir, #1A1A1A); margin: 0; }
.ct-info-item .val a { color: inherit; text-decoration: none; }
@media (max-width: 768px) { .ct-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ═══ TARIFS ═══ */
.tarifs-note { max-width: 820px; margin: 30px auto 0; padding: 18px 22px; border-radius: 12px; background: var(--syphax-or-bg, #FDF6E8); border: 1px solid var(--syphax-or, #D4960B); font-size: 14px; color: var(--syphax-gray-800, #3D3D3D); display: flex; gap: 12px; align-items: flex-start; }
.tarifs-note i { color: var(--syphax-or-dark, #A87608); font-size: 20px; flex-shrink: 0; }

/* ═══ LANDING ═══ */
.landing-hero { padding: 90px 0 110px; }
.landing-hero .cms-page-title { font-size: 52px; max-width: 900px; }
.landing-cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.landing-btn { padding: 15px 30px; border-radius: 10px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all .2s; }
.landing-btn.primary { background: var(--syphax-or, #D4960B); color: #fff; }
.landing-btn.primary:hover { background: #fff; color: var(--syphax-bordeaux, #1E3A8A); transform: translateY(-2px); }
.landing-btn.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.landing-btn.ghost:hover { background: rgba(255,255,255,.22); }
@media (max-width: 768px) { .landing-hero .cms-page-title { font-size: 34px; } }

/* ═══ SCROLL-TOP commun ═══ */
.cms-scroll-top { position: fixed; bottom: 24px; right: 24px; width: 48px; height: 48px; border-radius: 50%; background: var(--syphax-bordeaux, #1E3A8A); color: #fff; border: none; box-shadow: 0 4px 16px rgba(30,58,138,0.3); cursor: pointer; opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; font-size: 18px; }
.cms-scroll-top.show { opacity: 1; pointer-events: auto; }
.cms-scroll-top:hover { background: var(--syphax-or, #D4960B); transform: translateY(-3px); }
