/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #c9a84c;
    --gold-light: #e8d5a3;
    --gold-dark: #a8892e;
    --navy: #1a2634;
    --navy-light: #2c3a4b;
    --charcoal: #2d2d2d;
    --cream: #faf7f0;
    --white: #ffffff;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.18);
    --radius: 16px;
    --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER (fond #2a494b)
   ============================================ */
.header {
    background: #2a494b;
    color: var(--white);
    padding: 20px 0; /* Léger padding pour équilibrer la hauteur */
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px; /* Plus d'espace entre le logo agrandi et le texte */
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-icon {
    /* Fond doré SUPPRIMÉ */
    background: none;
    box-shadow: none;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 1.7rem; /* Agrandi pour suivre le nouveau logo */
    font-weight: 800;
    color: var(--white);
}

.logo-text .brand span {
    color: var(--gold);
}

.logo-text .sub {
    font-size: 0.85rem; /* Agrandi pour équilibrer */
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gold);
    color: var(--navy);
    padding: 14px 28px; /* Un peu plus large pour s'accorder au grand logo */
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.35);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.header-phone:hover,
.header-phone:focus-visible {
    transform: scale(1.04);
    background: var(--gold-light);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.5);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.header-phone i {
    font-size: 1.2rem;
}

/* ============================================
   HERO (fond auxerre.jpg + dégradé)
   ============================================ */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(42, 73, 75, 0.88) 0%, rgba(0, 0, 0, 0.70) 100%), 
                url('auxerre.webp') center/cover no-repeat;
    border-bottom: 3px solid var(--gold);
    min-height: 420px;
    display: flex;
    align-items: center;
}

.hero .container {
    width: 100%;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #ffffff;
    max-width: 900px;
    margin: 0 auto 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: var(--gold-light);
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gold);
    opacity: 0.4;
    border-radius: 4px;
}

.hero-sub {
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    max-width: 700px;
    margin: 0 auto 8px;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.hero-sub i {
    color: var(--gold-light);
    margin: 0 4px;
}

.hero-badge {
    display: inline-block;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--gold-light);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(201, 168, 76, 0.5);
}

.hero-badge i {
    margin-right: 6px;
    color: var(--gold);
}

/* ============================================
   CARDS / TROIS BOUTONS
   ============================================ */
.cards-section {
    padding: 50px 0 70px;
    background: var(--cream);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch; /* Assure que toutes les cartes ont la même hauteur */
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px 28px 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(201, 168, 76, 0.12);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    /* === NOUVEAU : hauteur uniforme === */
    height: 100%;           /* S'adapte à la hauteur de la ligne de la grille */
    min-height: 380px;      /* Hauteur minimale pour toutes les cartes */
    justify-content: flex-start;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    opacity: 0;
    transition: var(--transition);
}

.card:hover,
.card:focus-visible {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.card:hover::before,
.card:focus-visible::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
    flex-shrink: 0;
}

.card-icon.gold {
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold-dark);
}

.card-icon.navy {
    background: rgba(26, 38, 52, 0.10);
    color: var(--navy);
}

.card-icon.cream {
    background: rgba(250, 247, 240, 0.8);
    color: var(--gold-dark);
    border: 1px solid var(--gold-light);
}

.card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-dark);
    background: rgba(201, 168, 76, 0.12);
    padding: 2px 14px;
    border-radius: 50px;
    margin-bottom: 10px;
    display: inline-block;
    flex-shrink: 0;  /* Empêche le rétrécissement */
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
    flex-shrink: 0;  /* Empêche le rétrécissement */
}

.card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 18px;
    flex-grow: 1;    /* Le texte pousse vers le bas pour aligner tous les boutons */
    line-height: 1.5;
}

.card .btn-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--gold-dark);
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    margin-top: 4px;
    flex-shrink: 0;  /* Empêche le rétrécissement */
}

.card .btn-arrow i {
    transition: var(--transition);
    font-size: 0.9rem;
}

.card .btn-arrow:hover,
.card .btn-arrow:focus-visible {
    color: var(--navy);
}

.card .btn-arrow:hover i,
.card .btn-arrow:focus-visible i {
    transform: translateX(6px);
}

/* ============================================
   RESPONSIVE - Ajustement de la hauteur
   ============================================ */
@media (max-width: 768px) {
    .card {
        min-height: 320px;  /* Hauteur minimale réduite sur tablette */
        padding: 28px 22px 26px;
    }
}

@media (max-width: 480px) {
    .card {
        min-height: 280px;  /* Hauteur minimale réduite sur mobile */
        padding: 24px 18px 22px;
    }
}

/* ============================================
   TUNNELS — MODALS
   ============================================ */
.tunnel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tunnel-overlay.open {
    display: flex;
    opacity: 1;
}

.tunnel-modal {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 620px;
    width: 100%;
    padding: 40px 36px 36px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.30);
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-height: 90vh;
    overflow-y: auto;
}

.tunnel-overlay.open .tunnel-modal {
    transform: scale(1) translateY(0);
}

.tunnel-modal .close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    padding: 4px;
}

.tunnel-modal .close-btn:hover,
.tunnel-modal .close-btn:focus-visible {
    color: var(--charcoal);
    transform: rotate(90deg);
    outline: 2px solid var(--gold);
    outline-offset: 4px;
    border-radius: 50%;
}

.tunnel-modal .modal-icon {
    font-size: 2.6rem;
    color: var(--gold-dark);
    margin-bottom: 12px;
}

.tunnel-modal h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.tunnel-modal .modal-sub {
    color: var(--navy-light);
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.tunnel-modal .modal-body {
    color: #444;
    font-size: 0.95rem;
    line-height: 1.7;
}

.tunnel-modal .modal-body ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 20px;
}

.tunnel-modal .modal-body ul li {
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #f0ede7;
}

.tunnel-modal .modal-body ul li:last-child {
    border-bottom: none;
}

.tunnel-modal .modal-body ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--gold-dark);
    font-weight: 700;
}

.tunnel-modal .modal-cta {
    margin-top: 24px;
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(26, 38, 52, 0.25);
}

.tunnel-modal .modal-cta:hover,
.tunnel-modal .modal-cta:focus-visible {
    background: var(--gold-dark);
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(201, 168, 76, 0.4);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.tunnel-modal .modal-cta i {
    margin-right: 8px;
}

/* ============================================
   FOOTER (fond #2a494b, sans icône clé)
   ============================================ */
.footer {
    background: #2a494b;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0 24px;
    border-top: 3px solid var(--gold);
    margin-top: auto;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer .footer-brand {
    font-weight: 700;
    color: var(--white);
    font-size: 1.1rem;
}

.footer .footer-brand span {
    color: var(--gold);
}

.footer .footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.85rem;
}

.footer .footer-links a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer .footer-links a:hover,
.footer .footer-links a:focus-visible {
    color: var(--gold-light);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer .copy {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ============================================
   ACCESSIBILITÉ & PERFORMANCE
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

.card:focus-visible {
    outline-offset: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .logo {
        gap: 14px;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
    }

    .logo-text .brand {
        font-size: 1.4rem;
    }

    .logo-text .sub {
        font-size: 0.75rem;
    }

    .header-phone {
        justify-content: center;
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }

    .hero {
        padding: 60px 0 40px;
        min-height: 320px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .card {
        padding: 28px 22px 26px;
    }

    .tunnel-modal {
        padding: 28px 20px 24px;
        margin: 10px;
    }

    .tunnel-modal h2 {
        font-size: 1.3rem;
    }

    .footer .footer-links {
        gap: 14px;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .logo-icon {
        width: 56px;
        height: 56px;
    }

    .logo-text .brand {
        font-size: 1.1rem;
    }

    .logo-text .sub {
        font-size: 0.65rem;
    }

    .header-phone {
        font-size: 0.85rem;
        padding: 10px 16px;
        max-width: 220px;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .header {
        padding: 14px 0;
    }
}