/* ==========================================================================
   CK-INFO — Feuille de style principale
   ========================================================================== */

:root {
    --navy-950: #060b19;
    --navy-900: #0b132b;
    --navy-800: #111c3d;
    --royal-700: #1d4ed8;
    --royal-600: #2563eb;
    --royal-500: #3b82f6;
    --royal-100: #dbeafe;
    --royal-50: #eff6ff;

    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 36px rgba(11, 19, 43, 0.14);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: clip;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-main);
    background-color: var(--bg-page);
}

body {
    max-width: 100%;
    overflow-x: clip;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text-main);
    background-color: var(--bg-page);
}

img,
svg {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--royal-600);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--royal-700);
}

:focus-visible {
    outline: 3px solid var(--royal-500);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1rem;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy-900);
    color: #ffffff;
    padding: 0.65rem 1rem;
    z-index: 2000;
}

.skip-link:focus {
    left: 0;
}

/* ==========================================================================
   Barre supérieure (Topbar)
   ========================================================================== */
.topbar {
    background: var(--bg-subtle); /* Fond gris clair (#f1f5f9) pour bien détacher la barre */
    color: var(--text-main);      /* Texte bien lisible (#0f172a) */
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-strong); /* Bordure un peu plus marquée */
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    padding-block: 0.5rem;
}

.topbar-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    min-width: 0;
}

.topbar-meta a {
    color: var(--text-main);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.topbar-meta a:hover {
    color: var(--royal-600);
}

.topbar-meta .sep {
    color: var(--text-soft); /* Séparateurs '|' bien visibles sur le fond gris */
}

.topbar-phone {
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
}

/* ==========================================================================
   En-tête & navigation
   ========================================================================== */
.site-header {
    position: relative;
    width: 100%;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.8rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--navy-900);
    min-width: 0;
    flex-shrink: 0;
}

.brand-logo {
    height: 44px;
    width: auto;
    max-width: none;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-text strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy-900);
}

.brand-text small {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-nav-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    margin-left: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-horizontal {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
}

.nav-horizontal > li {
    position: relative;
}

.nav-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--navy-900);
}

button.nav-item-link {
    background: transparent;
    border: none;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
}

.nav-item-link:hover,
.nav-item-link.is-active {
    background: var(--royal-50);
    color: var(--royal-700);
}

/* Menu déroulant ordinateur (avec pont invisible ::before pour éviter tout décrochage au survol) */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 500;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
}

@media (hover: hover) and (pointer: fine) {
    .has-dropdown:hover .dropdown-menu {
        display: block;
    }
}

.has-dropdown.is-open .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-main);
}

.dropdown-link:hover,
.dropdown-link.is-active {
    background: var(--royal-50);
    color: var(--royal-700);
}

.dropdown-link.dropdown-all {
    font-weight: 700;
    color: var(--navy-900);
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: 0.3rem;
    padding-bottom: 0.65rem;
}

.nav-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: var(--royal-100);
    color: var(--royal-700);
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.8rem;
    background: var(--royal-600);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.menu-toggle:hover {
    background: var(--royal-700);
}

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
}

.btn-sm {
    padding: 0.55rem 0.85rem;
    font-size: 0.86rem;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--royal-600);
    color: #ffffff;
    border-color: var(--royal-600);
}

.btn-primary:hover {
    background: var(--royal-700);
    border-color: var(--royal-700);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--navy-900);
    border-color: var(--border-strong);
}

.btn-outline:hover {
    background: var(--bg-subtle);
    border-color: var(--navy-900);
    color: var(--navy-900);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-color: #ffffff;
}

/* ==========================================================================
   Mise en page principale & sections
   ========================================================================== */
.app-layout {
    width: 100%;
    padding-block: 1.75rem 3rem;
}

.main-content {
    width: 100%;
    min-width: 0;
}

.section-block {
    margin-top: 2rem;
}

.section-header {
    margin-bottom: 1.15rem;
}

.section-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    color: var(--navy-900);
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* Hero principal */
.hero-box {
    background: linear-gradient(135deg, var(--navy-950) 0%, var(--navy-800) 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 2rem;
}

.eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.3);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.hero-box h1 {
    margin: 0 0 0.8rem;
    font-size: clamp(1.65rem, 3.2vw, 2.4rem);
    line-height: 1.2;
    color: #ffffff;
}

.hero-lead {
    margin: 0 0 1.35rem;
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 62ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-visual svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Blocs points clés */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.highlight-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.highlight-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
}

.icon-rose {
    background: #be185d;
}

.icon-indigo {
    background: #3730a3;
}

.highlight-item h2 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    color: var(--navy-900);
}

.highlight-item p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Bandeau solutions & environnements */
.tools-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.tools-strip strong {
    color: var(--navy-900);
    font-size: 0.95rem;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.tools-list li {
    background: var(--royal-50);
    color: var(--royal-700);
    border: 1px solid var(--royal-100);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Grille de cartes de services */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.card-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.5rem;
}

.card-top h3 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--navy-900);
}

.card-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--royal-50);
    color: var(--royal-600);
    border: 1px solid var(--royal-100);
}

.card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

/* Formulaires */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-full {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background: #ffffff;
}

/* Pied de page */
.site-footer {
    background: var(--navy-950);
    color: #cbd5e1;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    padding-block: 2.5rem;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
}

.footer-logo {
    height: 38px;
    width: auto;
    max-width: none;
    object-fit: contain;
    background: #ffffff;
    padding: 4px 8px;
    border-radius: 8px;
}

.footer-brand {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0;
}

.site-footer h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #ffffff;
}

.site-footer p {
    margin: 0 0 0.65rem;
    font-size: 0.92rem;
    color: #cbd5e1;
}

.site-footer a {
    color: #93c5fd;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.45rem;
    font-size: 0.92rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-block: 1.1rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Responsive Mobile & Tablette (100% largeur, centré, ouverture EN DESSOUS)
   ========================================================================== */
@media (max-width: 900px) {
    .menu-toggle {
        display: inline-flex;
    }

    .header-inner {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        width: 100%;
    }

    .header-nav-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        margin-left: 0;
        width: 100%;
    }

    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.45rem;
        width: 100%;
    }

    .main-nav {
        display: none;
        position: static;
        width: 100%;
        max-width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 0.35rem 0.65rem;
        box-shadow: var(--shadow-sm);
    }

    .main-nav.is-open,
    #mainNav.is-open {
        display: block;
    }

    .nav-horizontal {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .nav-horizontal > li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-horizontal > li:last-child {
        border-bottom: none;
    }

    .nav-item-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0.8rem 0.5rem;
        border-radius: 0;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--navy-900);
    }

    .has-dropdown .dropdown-menu {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border);
        border-radius: 0;
        margin: 0;
        padding: 0.35rem 0 0.6rem 0.5rem;
        background: var(--bg-subtle);
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .has-dropdown .dropdown-menu::before {
        display: none;
    }

    .has-dropdown.is-open .dropdown-menu {
        display: block;
    }

    .dropdown-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
        padding: 0.65rem 0.4rem;
        font-size: 0.92rem;
        line-height: 1.35;
        white-space: normal;
        word-break: normal;
        overflow-wrap: normal;
    }

    .hero-split {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .hero-visual {
        max-width: 300px;
        margin-inline: auto;
    }

    .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .topbar-meta .sep {
        display: none;
    }

    .brand-logo {
        height: 36px;
    }

    .brand-text strong {
        font-size: 1rem;
    }

    .brand-text small {
        font-size: 0.72rem;
    }

    .hero-box {
        padding: 1.35rem 1rem;
    }

    .hero-box h1 {
        font-size: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .highlights-grid,
    .cards-grid,
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .highlight-item {
        padding: 1rem;
    }
}