/* ==========================================================================
   Groupe Kallan International — feuille de style du site
   Charte : bleu institutionnel #004A8F · bleu profond #002B55 · bleu voile #EEF3F9
   Titres Cormorant Garamond 500/600 · texte Montserrat 400/500/600 · rayon 2px
   ========================================================================== */

:root {
    --gki-bleu: #004A8F;
    --gki-profond: #002B55;
    --gki-voile: #EEF3F9;
    --gki-texte: #1A2233;
    --gki-texte-2: #3D4759;
    --gki-texte-3: #4A5468;
    --gki-texte-4: #5A6478;
    --gki-filet: #E1E8F1;
    --gki-filet-2: #C9D3E1;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: Montserrat, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FFFFFF; overflow-x: hidden; width: 100%; max-width: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { max-width: 100%; height: auto; }
a { color: var(--gki-bleu); text-decoration: none; }
a:hover { color: var(--gki-profond); }
:focus-visible { outline: 2px solid var(--gki-bleu); outline-offset: 3px; }
[x-cloak] { display: none !important; }

p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; word-wrap: break-word; }

.site { font-family: var(--sans); color: var(--gki-texte); background: #FFFFFF; font-size: 16px; line-height: 1.65; overflow-x: hidden; width: 100%; }

/* Mobile input zoom prevention */
@media (max-width: 768px) {
    input, select, textarea { font-size: 16px !important; }
}

/* --------------------------------------------------------------------------
   Mouvement (CSS uniquement, désactivé si « réduire les animations »)
   -------------------------------------------------------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes kenBurns { from { transform: scale(1.07); } to { transform: scale(1); } }

.hx { animation: fadeUp 1s cubic-bezier(.2, .7, .2, 1) both; }
.hx2 { animation-delay: .15s; }
.hx3 { animation-delay: .3s; }

.zoom { overflow: hidden; }
.zoom img { transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.zoom:hover img, a:hover .zoom img { transform: scale(1.06); }

.lift { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -24px rgba(0, 43, 85, .4); }

.val { transition: background .45s; }
.val:hover { background: #0B3F73; }

.lnk { background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .45s; }
.lnk:hover { background-size: 35% 1px; }

@supports (animation-timeline: view()) {
    .rv { animation: fadeUp linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
}

/* --------------------------------------------------------------------------
   En-tête & Navigation Responsive
   -------------------------------------------------------------------------- */
.site-topbar { background: var(--gki-profond); color: #C9D6E8; font-size: 12.5px; }
.site-topbar-inner { max-width: 1200px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
@media (max-width: 768px) {
    .site-topbar-address { display: none; }
    .site-topbar-inner { justify-content: flex-end; }
}

.site-header { border-bottom: 1px solid var(--gki-filet); background: #FFFFFF; position: sticky; top: 0; z-index: 100; transition: box-shadow .25s ease; }
.site-header-inner { max-width: 1200px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.site-logo { height: 60px; width: auto; display: block; transition: height .2s ease; }
@media (max-width: 768px) {
    .site-logo { height: 46px; }
}

.site-nav-desktop { display: flex; align-items: center; gap: 28px; font-size: 14.5px; font-weight: 500; }
.site-nav-desktop a { color: var(--gki-profond); transition: color .2s; }
.site-nav-desktop a:hover { color: var(--gki-bleu); }
.site-nav-desktop a.is-active { color: var(--gki-bleu); border-bottom: 2px solid var(--gki-bleu); padding-bottom: 4px; }
.site-nav-desktop .nav-cta { color: #FFFFFF !important; background: var(--gki-bleu); padding: 11px 22px; border-radius: 2px; font-weight: 600; border-bottom: none !important; transition: background .2s; }
.site-nav-desktop .nav-cta:hover { background: var(--gki-profond); }
.site-nav-desktop .nav-cta.is-active { background: var(--gki-profond); }

@media (max-width: 1023px) {
    .site-nav-desktop { display: none !important; }
}

/* Bouton burger mobile */
.burger-btn { display: none; background: transparent; border: 1px solid var(--gki-filet-2); border-radius: 3px; padding: 9px; cursor: pointer; color: var(--gki-profond); align-items: center; justify-content: center; width: 44px; height: 44px; transition: background .2s, border-color .2s; }
.burger-btn:hover { background: var(--gki-voile); border-color: var(--gki-bleu); }
.burger-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1023px) {
    .burger-btn { display: flex !important; }
}

/* Tiroir de navigation mobile */
.mobile-backdrop { position: fixed; inset: 0; background: rgba(0, 43, 85, .6); backdrop-filter: blur(4px); z-index: 999; }
.mobile-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 380px); background: #FFFFFF; z-index: 1000; box-shadow: -10px 0 35px rgba(0, 43, 85, .25); display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--gki-filet); background: #FFFFFF; }
.mobile-drawer-logo { height: 42px; width: auto; display: block; }
.mobile-drawer-close { background: none; border: none; font-size: 26px; line-height: 1; color: var(--gki-profond); cursor: pointer; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 3px; transition: background .2s; }
.mobile-drawer-close:hover { background: var(--gki-voile); }
.mobile-drawer-nav { display: flex; flex-direction: column; padding: 16px 18px; gap: 4px; }
.mobile-drawer-link { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; font-size: 16px; font-weight: 500; color: var(--gki-profond); border-radius: 4px; text-decoration: none; transition: background .15s, color .15s; }
.mobile-drawer-link:hover, .mobile-drawer-link:focus { background: var(--gki-voile); color: var(--gki-bleu); }
.mobile-drawer-link.is-active { background: var(--gki-voile); color: var(--gki-bleu); font-weight: 600; border-left: 3px solid var(--gki-bleu); }
.mobile-drawer-cta { margin: 12px 18px; background: var(--gki-bleu); color: #FFFFFF !important; text-align: center; padding: 14px 20px; font-weight: 600; font-size: 15px; border-radius: 2px; text-decoration: none; display: block; box-shadow: 0 4px 14px rgba(0, 74, 143, .25); }
.mobile-drawer-cta:hover { background: var(--gki-profond); }
.mobile-drawer-footer { margin-top: auto; padding: 22px 20px; background: #FAFBFD; border-top: 1px solid var(--gki-filet); font-size: 13px; color: var(--gki-texte-3); display: flex; flex-direction: column; gap: 14px; }
.mobile-drawer-footer a { color: var(--gki-profond); font-weight: 500; }

/* --------------------------------------------------------------------------
   Sous-navigation horizontale (onglets d'ancres)
   -------------------------------------------------------------------------- */
.subnav-bar { border-bottom: 1px solid var(--gki-filet); background: #FFFFFF; position: relative; z-index: 10; }
.subnav-inner { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.subnav-link { padding: 18px 0; color: var(--gki-texte-4); text-decoration: none; transition: color .2s; }
.subnav-link:hover { color: var(--gki-profond); }
.subnav-link.is-active { color: var(--gki-profond); border-bottom: 2px solid var(--gki-bleu); }
@media (max-width: 900px) {
    .subnav-inner { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 20px; }
    .subnav-inner::-webkit-scrollbar { display: none; }
    .subnav-link { white-space: nowrap; flex-shrink: 0; padding: 14px 4px; }
}

/* --------------------------------------------------------------------------
   Accueil : photos de couverture qui alternent derrière le texte
   -------------------------------------------------------------------------- */
.hero-cover { position: relative; overflow: hidden; min-height: 640px; display: flex; align-items: center; background: var(--gki-profond); }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); display: block; opacity: 0; transition: opacity 1.6s ease; }
.hero-photo.is-active { opacity: 1; animation: kenBurns 9s ease-out both; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 27, 54, .92) 0%, rgba(0, 43, 85, .8) 36%, rgba(0, 43, 85, .28) 66%, rgba(0, 43, 85, .04) 100%); }
@media (max-width: 760px) {
    .hero-cover { min-height: 520px; }
    .hero-photo { object-position: var(--pos-m, center); }
    .hero-veil { background: linear-gradient(180deg, rgba(0, 27, 54, .55) 0%, rgba(0, 43, 85, .82) 55%, rgba(0, 27, 54, .92) 100%); }
}

/* Boutons hero responsive */
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
@media (max-width: 520px) {
    .hero-actions { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
    .hero-actions > a { text-align: center !important; justify-content: center !important; width: 100% !important; box-sizing: border-box !important; }
}

/* Chiffres clés sous le hero */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.hero-stat-item { padding: 30px 24px 40px; border-right: 1px solid #3A72AE; }
.hero-stat-item:first-child { padding-left: 0; }
.hero-stat-item:last-child { border-right: none; }
.hero-stat-num { font-family: var(--serif); font-size: 54px; font-weight: 600; line-height: 1; }
.hero-stat-label { margin-top: 10px; font-size: 13.5px; color: #DCE6F3; }

@media (min-width: 541px) and (max-width: 900px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stat-item { padding: 24px 16px; border-right: none; border-bottom: 1px solid #3A72AE; }
    .hero-stat-item:nth-child(odd) { border-right: 1px solid #3A72AE; }
    .hero-stat-item:nth-child(3), .hero-stat-item:nth-child(4) { border-bottom: none; }
    .hero-stat-item:first-child { padding-left: 16px; }
    .hero-stat-num { font-size: 44px; }
}
@media (max-width: 540px) {
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .hero-stat-item { padding: 20px 10px; border-right: none; border-bottom: 1px solid #3A72AE; }
    .hero-stat-item:nth-child(odd) { border-right: 1px solid #3A72AE; }
    .hero-stat-item:nth-child(3), .hero-stat-item:nth-child(4) { border-bottom: none; }
    .hero-stat-item:first-child { padding-left: 10px; }
    .hero-stat-num { font-size: 34px; }
    .hero-stat-label { font-size: 12.5px; }
}

/* --------------------------------------------------------------------------
   Chronologie / Histoire Responsive (Page Le Groupe)
   -------------------------------------------------------------------------- */
.timeline-desktop { display: block; overflow-x: auto; padding-bottom: 8px; }
.timeline-mobile { display: none; }

@media (max-width: 991px) {
    .timeline-desktop { display: none !important; }
    .timeline-mobile { display: block !important; }
}

.v-timeline { position: relative; padding-left: 32px; margin-top: 24px; }
.v-timeline::before { content: ""; position: absolute; left: 9px; top: 12px; bottom: 20px; width: 2px; background: var(--gki-bleu); }
.v-timeline-item { position: relative; margin-bottom: 28px; }
.v-timeline-item:last-child { margin-bottom: 0; }
.v-timeline-dot { position: absolute; left: -32px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--gki-bleu); box-sizing: border-box; }
.v-timeline-item.is-final .v-timeline-dot { width: 18px; height: 18px; left: -34px; background: var(--gki-bleu); }
.v-timeline-year { font-family: var(--serif); font-size: 34px; font-weight: 600; color: var(--gki-bleu); line-height: 1; margin: 0 0 10px; }
.v-timeline-card { background: var(--gki-voile); border: 1px solid var(--gki-filet); border-radius: 2px; overflow: hidden; }
.v-timeline-card.is-blue { background: var(--gki-bleu); color: #FFFFFF; }
.v-timeline-card.is-blue .v-timeline-text { color: #DCE6F3; }
.v-timeline-card.is-blue .v-timeline-year-inner { color: #FFFFFF; }
.v-timeline-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.v-timeline-body { padding: 18px; }
.v-timeline-text { margin: 0; font-size: 14.5px; color: var(--gki-texte-2); }

/* --------------------------------------------------------------------------
   Offre intégrée SOFAMER (Page Filiales)
   -------------------------------------------------------------------------- */
.steps-desktop { display: block; overflow-x: auto; padding-bottom: 4px; }
.steps-mobile { display: none; }

@media (max-width: 991px) {
    .steps-desktop { display: none !important; }
    .steps-mobile { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
}

.steps-mobile-card { background: #FFFFFF; border: 1px solid var(--gki-filet); border-radius: 2px; padding: 20px; display: flex; align-items: flex-start; gap: 16px; }
.steps-mobile-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--gki-bleu); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }

/* --------------------------------------------------------------------------
   Grille des valeurs (Page Le Groupe)
   -------------------------------------------------------------------------- */
.values-grid { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid #234C7A; border-left: 1px solid #234C7A; }
@media (min-width: 641px) and (max-width: 1023px) {
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .values-grid { grid-template-columns: 1fr; border-left: none; }
}

/* --------------------------------------------------------------------------
   Médias & Chips
   -------------------------------------------------------------------------- */
.chips-scroll { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
@media (max-width: 768px) {
    .chips-scroll { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 6px; }
    .chips-scroll::-webkit-scrollbar { display: none; }
    .chips-scroll > * { flex-shrink: 0; white-space: nowrap; }
}

.chip { font-family: var(--sans); font-size: 13.5px; font-weight: 500; padding: 10px 18px; border-radius: 2px; border: 1px solid var(--gki-filet-2); background: #FFFFFF; color: var(--gki-profond); cursor: pointer; transition: border-color .25s, background .25s, color .25s; }
.chip:hover { border-color: var(--gki-bleu); }
.chip.is-active { font-weight: 600; border-color: var(--gki-bleu); background: var(--gki-bleu); color: #FFFFFF; }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 56px; font-size: 14px; }
.pg { font-family: var(--sans); font-size: 14px; padding: 10px 16px; border: 1px solid var(--gki-filet-2); color: var(--gki-profond); background: #FFFFFF; border-radius: 2px; cursor: pointer; line-height: 1.4; }
.pg:hover { border-color: var(--gki-bleu); }
.pg.is-current { background: var(--gki-bleu); border-color: var(--gki-bleu); color: #FFFFFF; cursor: default; }
.pg-gap { border-color: transparent; cursor: default; }

.media-fallback { background: var(--gki-profond); display: grid; place-items: center; }
.media-fallback img { width: 34%; max-width: 180px; height: auto; opacity: .9; }

.prose { font-size: 17px; line-height: 1.8; color: var(--gki-texte-2); }
.prose p { margin: 0 0 1.4em; }

[aria-busy="true"] { opacity: .55; }

/* --------------------------------------------------------------------------
   Formulaires et Boutons Utilitaires
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--gki-profond); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel], .field input[type=date], .field select, .field textarea { font-family: var(--sans); font-size: 15px; padding: 12px 14px; border: 1px solid var(--gki-filet-2); border-radius: 2px; background: #FFFFFF; color: var(--gki-texte); width: 100%; box-sizing: border-box; }
.field textarea { resize: vertical; }
.field .hint { font-weight: 400; font-size: 12.5px; color: var(--gki-texte-4); }
.field .err { font-weight: 500; font-size: 12.5px; color: #B42318; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14.5px var(--sans); padding: 13px 24px; border-radius: 2px; border: 1px solid var(--gki-bleu); background: var(--gki-bleu); color: #FFFFFF; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { background: var(--gki-profond); border-color: var(--gki-profond); color: #FFFFFF; }
.btn.ghost { background: #FFFFFF; color: var(--gki-bleu); }
.btn.ghost:hover { background: var(--gki-voile); color: var(--gki-profond); }
.btn.danger { background: #FFFFFF; color: #B42318; border-color: #E6B8B3; padding: 8px 14px; font-size: 13px; }
.btn.small { padding: 8px 14px; font-size: 13px; }

@media (max-width: 540px) {
    .btn-mobile-full { width: 100% !important; box-sizing: border-box !important; }
}

/* --------------------------------------------------------------------------
   Sticky sidebar adjustment on mobile
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .sticky-desktop { position: static !important; }
}

/* --------------------------------------------------------------------------
   Footer responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
}

/* --------------------------------------------------------------------------
   Administration
   -------------------------------------------------------------------------- */
.adm { font-family: var(--sans); color: var(--gki-texte); background: var(--gki-voile); min-height: 100vh; font-size: 15px; line-height: 1.6; }
.adm-bar { background: var(--gki-profond); color: #C9D6E8; }
.adm-bar .in { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.adm-bar a, .adm-bar button { color: #FFFFFF; font: 500 14px var(--sans); background: none; border: 0; cursor: pointer; padding: 0; }
.adm-main { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
@media (max-width: 640px) {
    .adm-main { padding: 24px 16px 60px; }
}
.adm h1 { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1.1; color: var(--gki-profond); margin: 0; }
@media (max-width: 640px) {
    .adm h1 { font-size: 32px; }
}
.adm-card { background: #FFFFFF; border: 1px solid var(--gki-filet); padding: 28px; }
@media (max-width: 640px) {
    .adm-card { padding: 18px 16px; }
}
.adm-table { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid var(--gki-filet); }
.adm-table th, .adm-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--gki-filet); vertical-align: middle; }
.adm-table th { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gki-texte-4); font-weight: 600; background: #FAFBFD; }
.adm-table img { width: 72px; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 2px; background: var(--gki-voile); color: var(--gki-profond); }
.badge.ok { background: #E3F1E8; color: #1E6B3A; }
.badge.draft { background: #F4EEDF; color: #7A5A12; }
.flash { background: #E3F1E8; color: #1E6B3A; padding: 12px 16px; margin-bottom: 24px; font-weight: 500; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Organigramme de la gouvernance : traits de liaison masqués quand les cartes s'empilent */
@media (max-width: 900px) { .org-link { display: none; } }
