/* ============================================================
   CABINET ROMAIN PACHOT — FEUILLE DE STYLE
   Couleurs : Bleu Marine #003b73 | Jaune Orangé #ffb300
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-weight: 400;
    background: linear-gradient(to bottom, #ffffff 0%, #d8f6f6 100%) fixed;
    min-height: 100vh;
    color: #2c2c3a;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

h1, h2, h3, h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.25;
    color: #003b73;
}

p, li, td, th, label, input, textarea, select, button {
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* ============================================================
   NAVIGATION (NAVBAR)
   ============================================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 95px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-left .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
}

.logo-img {
    height: 65px;
    width: auto;
}

.cabinet-name {
    display: block;
    font-weight: 800;
    color: #003b73;
    font-size: 1.4rem;
    text-transform: uppercase;
}

.cabinet-sub {
    font-size: 0.85rem;
    color: #666;
    font-weight: 400;
}

/* Liens navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links > li {
    position: relative;
    height: 95px;
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 10px ;
}

/* Barre jaune au survol — sous le lien (pas au-dessus du contenu) */
.nav-links > li > a:not(.btn-nav-devis):not(.btn-nav-calc):not(.btn-nav-login):not(.nav-user-btn) {
    position: relative;
}
.nav-links > li > a:not(.btn-nav-devis):not(.btn-nav-calc):not(.btn-nav-login):not(.nav-user-btn)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    left: 0;
    background-color: #ffb300;
    border-radius: 2px;
    transition: width 0.25s ease;
}

.nav-links > li:hover > a:not(.btn-nav-devis):not(.btn-nav-calc):not(.btn-nav-login):not(.nav-user-btn)::after {
    width: 100%;
}

.nav-links > li:hover > a:not(.btn-nav-devis):not(.btn-nav-calc):not(.btn-nav-login) {
    color: #003b73;
}

/* Menus déroulants */
.dropdown-content {
    display: none;
    position: absolute;
    background: #fff;
    top: 95px;
    left: 0;
    min-width: 240px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #003b73 #edf4fb;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-top: 4px solid #ffb300;
    z-index: 999;
}
.dropdown-content::-webkit-scrollbar        { width: 5px; }
.dropdown-content::-webkit-scrollbar-track  { background: #edf4fb; }
.dropdown-content::-webkit-scrollbar-thumb  { background: #003b73; border-radius: 3px; }

/* Indicateur de scroll bas */
.dropdown-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    display: block;
    height: 32px;
    background: linear-gradient(transparent, rgba(255,255,255,0.96));
    pointer-events: none;
    margin-top: -32px;
    transition: opacity 0.2s;
}
.dropdown-content.dd-at-bottom::after { opacity: 0; }
/* Indicateur de scroll haut */
.dropdown-content::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: 20px;
    background: linear-gradient(rgba(255,255,255,0.96), transparent);
    pointer-events: none;
    margin-bottom: -20px;
    opacity: 0;
    transition: opacity 0.2s;
}
.dropdown-content.dd-scrolled::before { opacity: 1; }

.dropdown:hover .dropdown-content { display: block; }

.dropdown-content li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid #f5f5f5;
    color: #444;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-content a:hover {
    background: #f0f5fa;
    color: #003b73;
    padding-left: 25px;
}

/* Bouton "Calculatrice" */
.btn-nav-calc {
    background: #e8f4ff;
    color: #003b73 !important;
    padding: 11px 20px;
    min-width: 120px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
    border: 1px solid #b3d4f5;
    white-space: nowrap;
}
.btn-nav-calc:hover { background: #cce5ff; transform: translateY(-2px); }
.btn-nav-calc::after { display: none !important; }

/* Bouton "Mon Devis" */
.btn-nav-devis {
    background: #ffb300;
    color: #003b73 !important;
    padding: 11px 20px;
    min-width: 120px;
    text-align: center;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}
.btn-nav-devis:hover { background: #ffa000; transform: translateY(-2px); }
.btn-nav-devis::after { display: none !important; }

/* Bouton "Espace Client" */
.btn-nav-login {
    background: #003b73;
    color: #fff !important;
    padding: 11px 20px;
    min-width: 130px;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}
.btn-nav-login:hover { background: #002a56 !important; transform: translateY(-2px); }
.btn-nav-login::after { display: none !important; }

/* Avatar utilisateur connecté */
.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #333;
}
.nav-user-btn::after { display: none !important; }

.nav-avatar {
    background: #003b73;
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Dropdown dernier élément nav (user menu) — ne déborde pas à droite */
.nav-links > li:last-child .dropdown-content {
    left: auto !important;
    right: 0 !important;
}
/* Sécurité supplémentaire pour tous les dropdowns proches du bord droit */
.nav-links > li:nth-last-child(-n+2) .dropdown-content {
    left: auto !important;
    right: 0 !important;
}

/* Barre utilisateur (admin/client) — fine, discrète, en haut à gauche */
.user-bar {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 5px 5%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-bar-role {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.user-bar-btn {
    background: #003b73;
    color: #fff !important;
    text-decoration: none;
    padding: 4px 14px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.user-bar-btn:hover {
    background: #002a56;
}

/* ============================================================
   HERO — PAGE D'ACCUEIL
   ============================================================ */
.hero-blue-container {
    background-color: #003b73;
    padding: 50px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    max-width: 1100px;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.hero-bg-img {
    width: 100%;
    height: 440px;
    display: block;
    object-fit: cover;
    object-position: 50% 50%; /* par défaut centré ; surchargé inline par hero_crop_style() */
    filter: brightness(0.65);
}

.hero-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 90%;
    z-index: 2;
}

.hero-overlay-content h1 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: white;
}

.hero-overlay-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Hero classique (autres pages) */
.hero-blue {
    background-color: #003b73;
    color: white;
    padding: 80px 20px;
    text-align: center;
    width: 100%;
}

.hero-blue h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================================
   CONTENU PUBLIC
   ============================================================ */
.content-section {
    padding: 60px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.box-blue {
    background: #f0f5fa;
    padding: 40px;
    border-left: 10px solid #003b73;
    margin: 30px 0;
    border-radius: 5px;
}

.box-yellow {
    background: #fffdf2;
    padding: 40px;
    border-left: 10px solid #ffb300;
    margin: 30px 0;
    border-radius: 5px;
}

/* Boutons publics (jaune) — NE PAS utiliser button[type=submit] en générique */
.btn-yellow-main,
.btn-submit-form {
    background: #ffb300;
    color: #003b73;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 800;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-align: center;
    font-size: 1rem;
    font-family: inherit;
}
.btn-yellow-main:hover,
.btn-submit-form:hover {
    background: #ffa000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Présentation biographie */
.presentation-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    margin-top: 40px;
}

.photo-pere { flex: 0 0 250px; }
.photo-pere img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 12px 12px 0 #ffb300;
}

.texte-bio { flex: 1; }

.texte-bio h3 {
    color: #003b73;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.bio-barre {
    width: 60px;
    height: 5px;
    background: #ffb300;
    margin-bottom: 20px;
}

/* Partenaires */
.partners-section {
    background: #f9f9f9;
    padding: 60px 5%;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.partners-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.partners-title {
    color: #003b73;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
    font-weight: 500;
}

.partners-grid {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.partner-item img {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s;
}
.partner-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================================
   FOOTER PUBLIC
   ============================================================ */

/* --- Barre réseaux sociaux --- */
.social-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 28px 20px;
    text-align: center;
}
.social-bar-title {
    font-size: 0.875rem;
    color: #94a3b8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 600;
}
.social-bar-icons {
    display: flex;
    justify-content: center;
    gap: 14px;
}
.social-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}
.social-icon:hover { transform: translateY(-3px); opacity: 0.85; }
.social-facebook  { background: #1877f2; }
.social-google    { background: #ea4335; }
.social-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #515bd4); }
.social-linkedin  { background: #0a66c2; }

.footer-bar {
    background: #2a2a2a;
    color: #fff;
    margin-top: 60px;
    position: relative;
    width: 100%;
    border-top: 3px solid #ffb300;
}

.footer-trigger {
    display: none;
}

.footer-content {
    padding: 28px 10% 22px 10%;
    opacity: 1;
    pointer-events: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-column h4 {
    color: #ffb300;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1.5px;
    font-size: 0.82rem;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.footer-column a:hover { color: #ffb300; padding-left: 5px; transition: 0.2s; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.8rem;
    color: #888;
}

/* Masquer le footer et la barre réseaux sociaux sur les pages admin/dashboard/calculatrice/simulation */
.page-backend .footer-bar  { display: none !important; }
.page-backend .social-bar  { display: none !important; }
.page-nofooter .footer-bar { display: none !important; }
.page-nofooter .social-bar { display: none !important; }

/* ============================================================
   BOUTON FLOTTANT CONTACT (CTA)
   ============================================================ */
.float-cta {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.float-cta-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #003b73;
    color: #fff;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,59,115,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.float-cta-toggle:hover  { background: #002a56; }
.float-cta-toggle.open   { background: #ef4444; transform: rotate(135deg); }

.float-cta-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.25s, transform 0.25s;
}
.float-cta-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.float-cta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 28px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(0,0,0,.2);
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
}
.float-cta-item:hover { opacity: 0.88; transform: scale(1.03); }
.float-cta-phone  { background: #003b73; }
.float-cta-mail   { background: #0369a1; }
.float-cta-devis  { background: #ffb300; color: #1a1a1a; }

/* ============================================================
   FORMULAIRES (LOGIN, SIMULATION)
   ============================================================ */
.form-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #003b73;
    box-shadow: 0 0 0 3px rgba(0,59,115,0.1);
}

.btn-primary-full {
    width: 100%;
    background: #003b73;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.btn-primary-full:hover { background: #002a56; }

.alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* ============================================================
   DASHBOARD & ADMIN — LAYOUT
   ============================================================ */
.page-backend {
    background: #f1f5f9;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 95px);
}

/* Sidebar */
.dashboard-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #0f172a;
    color: #cbd5e1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: calc(100vh - 95px);
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1e293b;
    border-radius: 10px;
    margin-bottom: 20px;
}

.sidebar-profile strong { display: block; color: #f1f5f9; font-size: 0.95rem; }
.sidebar-profile small  { color: #94a3b8; font-size: 0.78rem; }

.sidebar-avatar {
    background: #ffb300;
    color: #003b73;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.sidebar-link:hover  { background: #1e293b; color: #f1f5f9; }
.sidebar-link.active { background: #003b73; color: #fff; font-weight: 600; }
.sidebar-link.sidebar-logout { color: #f87171; margin-top: 8px; }
.sidebar-link.sidebar-logout:hover { background: rgba(127,29,29,0.13); }

/* Contenu principal du dashboard */
.dashboard-main {
    flex: 1;
    padding: 32px 40px;
    background: #f8fafc;
    overflow-x: auto;
    min-width: 0;
}

.dash-title {
    font-size: 1.7rem;
    color: #0f172a;
    margin-bottom: 24px;
    font-weight: 700;
}

/* Cartes statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border-left: 4px solid transparent;
}
.stat-card.stat-green  { border-color: #22c55e; }
.stat-card.stat-orange { border-color: #f59e0b; }
.stat-card.stat-red    { border-color: #ef4444; }
.stat-card.stat-blue   { border-color: #003b73; }
.stat-card.stat-purple { border-color: #8b5cf6; }

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}
.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

/* Cartes tableau de bord */
.dash-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-card h2 {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
}

.btn-link {
    color: #003b73;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }

/* Table tableau de bord */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.dash-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dash-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: #f8fafc; }

/* Contact block */
.dash-contact { background: linear-gradient(135deg, #003b73, #0056a8); color: #fff; }
.dash-contact h2 { color: #fff; }
.dash-contact p  { color: #bfdbfe; }

.btn-contact {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-contact:hover { background: rgba(255,255,255,0.25); }

/* Filtres */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    font-family: inherit;
}
.filter-btn:hover  { border-color: #003b73; color: #003b73; }
.filter-btn.active { background: #003b73; color: #fff; border-color: #003b73; }

/* Grille contrats client */
.contracts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.contract-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.contract-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.contract-type { font-weight: 700; color: #003b73; font-size: 1rem; }

.contract-details { font-size: 0.875rem; }
.contract-details > div {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
}
.contract-details > div:last-child { border-bottom: none; }
.contract-details span   { color: #64748b; }
.contract-details strong { color: #0f172a; }

.contract-notes {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-style: italic;
}

.btn-download {
    display: block;
    margin-top: 14px;
    text-align: center;
    background: #f0f9ff;
    color: #003b73;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s;
}
.btn-download:hover { background: #dbeafe; }

/* ============================================================
   ADMIN — Boutons & Formulaires
   ============================================================ */
.btn-primary {
    background: #003b73;
    color: #fff;
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
    font-family: inherit;
}
.btn-primary:hover { background: #002a56; }

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    padding: 9px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-secondary:hover { background: #e2e8f0; }

.btn-admin-action {
    background: #ffb300;
    color: #003b73;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.875rem;
    transition: background 0.2s;
    display: inline-block;
}
.btn-admin-action:hover { background: #e6a100; }

.td-actions { white-space: nowrap; }

.btn-action-edit,
.btn-action-del,
.btn-action-warn {
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 4px;
    display: inline-block;
    transition: background 0.2s;
}
.btn-action-edit { background: #dbeafe; color: #1d4ed8; }
.btn-action-edit:hover { background: #bfdbfe; }
.btn-action-warn { background: #fef9c3; color: #854d0e; }
.btn-action-warn:hover { background: #fde68a; }
.btn-action-del  { background: #fee2e2; color: #b91c1c; }
.btn-action-del:hover  { background: #fecaca; }

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cms-textarea {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Badges statut contrat */
.badge-actif    { background: #dcfce7; color: #16a34a; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-suspendu { background: #fef9c3; color: #854d0e; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }
.badge-résilié  { background: #fee2e2; color: #b91c1c; padding: 2px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; display: inline-block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── Hamburger button ──────────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}
.hamburger span {
    display: block;
    height: 3px;
    background: #003b73;
    border-radius: 3px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 900px) {
    .hamburger { display: flex; }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: fixed;
        top: 95px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 1050;
        padding: 12px 0 20px;
        max-height: calc(100vh - 95px);
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }

    .nav-links > li {
        height: auto;
        border-bottom: 1px solid #f0f4f8;
    }
    .nav-links > li > a {
        display: block;
        padding: 14px 24px;
        font-size: 1rem;
    }
    .nav-links > li > a::after { display: none; }

    /* Dropdowns en mobile : toujours visibles en accordéon */
    .nav-links .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        max-height: none;
        overflow-y: visible;
        scrollbar-width: auto;
        background: #f8fafc;
        display: none;
        min-width: unset;
        padding: 0;
        border-radius: 0;
    }
    .nav-links .dropdown-content::after,
    .nav-links .dropdown-content::before {
        display: none;
    }
    .nav-links .dropdown.open > .dropdown-content { display: block; }
    .nav-links .dropdown-content li a {
        padding: 11px 36px;
        font-size: 0.9rem;
        color: #444;
        border-bottom: 1px solid #edf2f7;
    }
    .nav-links .dropdown > a::before {
        content: '▸';
        float: right;
        transition: transform 0.25s;
    }
    .nav-links .dropdown.open > a::before { transform: rotate(90deg); }

    /* Boutons dans la navbar mobile */
    .btn-nav-devis, .btn-nav-calc, .btn-nav-login {
        margin: 8px 16px;
        display: block;
        text-align: center;
    }
    .nav-avatar { margin-right: 6px; }

    .presentation-grid { flex-direction: column; align-items: center; text-align: center; }
    .hero-overlay-content h1 { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .partners-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }

    .dashboard-layout { flex-direction: column; }
    .dashboard-sidebar {
        width: 100%;
        min-height: unset;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        gap: 4px;
    }
    .sidebar-profile { display: none; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .dashboard-main { padding: 20px 16px; }
    .admin-form .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .content-section { padding: 40px 5%; }
    .hero-overlay-content h1 { font-size: 1.5rem; }
}

/* ── Carousel services ──────────────────────────────────────────────── */
.services-carousel-section {
    background: #f0f7ff;
    padding: 60px 0 50px;
    border-bottom: 1px solid #dde8f5;
}

.carousel-section-title {
    text-align: center;
    color: #003b73;
    font-size: 2rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 36px;
}

.carousel-container {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.carousel-track-wrapper {
    overflow: hidden;
    flex: 1;
}

.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(.25,.8,.25,1);
}

.service-card {
    flex-shrink: 0;
    background: #fff;
    border-radius: 14px;
    padding: 32px 24px 28px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(0,59,115,.08);
    border: 1px solid #dde8f5;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    display: block;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,59,115,.16);
    border-color: #003b73;
}

.service-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.6rem;
    color: #003b73;
    transition: background 0.25s, color 0.25s;
}

.service-card:hover .service-card-icon {
    background: #003b73;
    color: #fff;
}

.service-card h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #003b73;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.88rem;
    color: #5a7a9a;
    line-height: 1.5;
    margin: 0;
}

.carousel-btn {
    background: #fff;
    border: 1px solid #dde8f5;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
    line-height: 1;
    color: #003b73;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,59,115,.08);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #003b73;
    color: #fff;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #b3d4f5;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.carousel-dot.active {
    background: #003b73;
    transform: scale(1.3);
}
