/* ==========================================================================
   Variables de couleur (palette officielle)
   ========================================================================== */
:root {
    --navy: #084A62;          /* Fond fort (hero, footer), texte sur fond clair */
    --teal: #177C8B;          /* Couleur d'interaction principale (liens, focus) */
    --red: #DC3C35;           /* Call-to-action principal, boutons d'action */
    --yellow: #FFCA5A;        /* Accents, badges */
    --text-main: #1a1a1a;
    --text-muted: #5c6b70;
    --bg-alt: #F0F6F7;        /* Fond légèrement teinté teal pour alterner les sections */
    --border-color: #e2e8ea;
    --radius: 10px;
}

/* ==========================================================================
   Reset de base et typographie
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    background: #fff;
}

.header-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

.nav-toggle {
    position: relative;
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, background 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span {
    background: #fff;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
    display: none;
}

.main-nav.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--navy);
    animation: nav-overlay-in 0.25s ease both;
}

.main-nav.is-open a:not(.btn) {
    opacity: 0;
    animation: nav-link-in 0.4s ease both;
}

.main-nav.is-open a:not(.btn):nth-child(1) { animation-delay: 0.05s; }
.main-nav.is-open a:not(.btn):nth-child(2) { animation-delay: 0.1s; }
.main-nav.is-open a:not(.btn):nth-child(3) { animation-delay: 0.15s; }
.main-nav.is-open a:not(.btn):nth-child(4) { animation-delay: 0.2s; }
.main-nav.is-open a:not(.btn):nth-child(5) { animation-delay: 0.25s; }

.main-nav a:not(.btn) {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.account-menu,
.account-panel {
    display: contents;
}

.account-trigger {
    display: none;
}

.main-nav.is-open a:not(.btn) {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
}

.main-nav.is-open a:not(.btn):hover {
    color: var(--yellow);
}

.main-nav.is-open .btn-outline {
    border-color: #fff;
    color: #fff;
}

.main-nav.is-open .btn-outline:hover {
    background: #fff;
    color: var(--navy);
}

body.nav-open {
    overflow: hidden;
}

@keyframes nav-overlay-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes nav-link-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 641px) {
    .nav-toggle {
        display: none;
    }

    .main-nav {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 24px;
        background: none;
        animation: none;
    }

    .main-nav a:not(.btn) {
        opacity: 1;
        animation: none;
    }

    .account-menu {
        display: block;
        position: relative;
    }

    .account-panel {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        min-width: 200px;
        flex-direction: column;
        gap: 4px;
        background: #fff;
        border-radius: var(--radius);
        box-shadow: 0 4px 24px rgba(8, 74, 98, 0.12);
        padding: 8px;
        z-index: 50;
    }

    .account-panel.is-open {
        display: flex;
    }

    .account-panel a:not(.btn) {
        padding: 10px 12px;
        border-radius: 6px;
    }

    .account-panel a:not(.btn):hover {
        background: var(--bg-alt);
        color: var(--teal);
    }

    .account-trigger {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px 6px 6px;
        border: 1px solid var(--border-color);
        border-radius: 999px;
        background: #fff;
        cursor: pointer;
        font-family: inherit;
    }

    .account-trigger:hover {
        border-color: var(--teal);
    }

    .account-avatar {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: var(--teal);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
    }

    .account-name {
        color: var(--navy);
        font-size: 14px;
        font-weight: 500;
    }
}

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--red);
    color: #fff;
}
.btn-primary:hover {
    background: #c22f29;
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 1px solid var(--navy);
}
.btn-outline:hover {
    background: var(--navy);
    color: #fff;
}

.btn-ghost {
    color: var(--teal);
    text-decoration: underline;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    background: var(--navy);
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 18px;
    color: #cfe3e8;
    max-width: 560px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.hero .btn-ghost {
    color: var(--yellow);
}

/* ==========================================================================
   Sections génériques
   ========================================================================== */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    font-size: 32px;
    text-align: center;
    color: var(--navy);
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
}

/* ==========================================================================
   Grille produits
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.product-card:hover {
    border-color: var(--teal);
}

.product-icon {
    width: 40px;
    height: 40px;
    background: var(--teal);
    border-radius: 8px;
    margin: 0 auto 16px;
}

.product-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: var(--navy);
}

.product-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   Grille tarifs
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    position: relative;
}

.pricing-featured {
    border: 2px solid var(--red);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--yellow);
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.promo-badge {
    display: inline-block;
    background: var(--yellow);
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.pricing-card h3 {
    margin-bottom: 8px;
    color: var(--navy);
}

.price {
    font-size: 36px;
    font-weight: 700;
    color: var(--teal);
    margin-bottom: 8px;
}

.price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ==========================================================================
   CTA finale
   ========================================================================== */
.cta-section {
    text-align: center;
}

.cta-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--navy);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--navy);
    padding: 32px 0;
    text-align: center;
    color: #cfe3e8;
    font-size: 14px;
}

.site-footer a {
    color: #cfe3e8;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #fff;
}

/* ==========================================================================
   Pages Register / Login (formulaires d'authentification)
   ========================================================================== */
.auth-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius);
    border-top: 4px solid var(--teal);
    box-shadow: 0 4px 24px rgba(8, 74, 98, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-card--wide {
    max-width: 560px;
}

.auth-card h1 {
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 24px;
    text-align: center;
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"],
.auth-card input[type="tel"],
.auth-card textarea,
.auth-card select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card textarea {
    min-height: 140px;
    resize: vertical;
}

.auth-card input[type="email"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="text"]:focus,
.auth-card input[type="tel"]:focus,
.auth-card textarea:focus,
.auth-card select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(23, 124, 139, 0.15);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-grid > div {
    margin: 0;
}

.auth-card input[type="checkbox"] {
    margin-right: 8px;
}

.auth-card .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-card ul {
    list-style: none;
    color: var(--red);
    font-size: 13px;
    margin-top: 4px;
}

.auth-card .form-help {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 20px;
}

.auth-card .form-help a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================================================
   Flash messages
   ========================================================================== */
.flash {
    margin: 24px auto;
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    max-width: 800px;
}

.flash-success {
    background: #e6f4ea;
    color: #1e7a3d;
    border: 1px solid #b7e0c3;
}

.flash-error {
    background: #fbe9e8;
    color: var(--red);
    border: 1px solid #f2c2bf;
}

/* ==========================================================================
   Pages légales (mentions légales, CGU, politique de confidentialité...)
   ========================================================================== */
.legal-header {
    background: var(--navy);
    padding: 64px 0 48px;
    text-align: center;
}

.legal-header h1 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 8px;
}

.legal-header p {
    color: #cfe3e8;
    font-size: 14px;
}

.legal-content {
    padding: 56px 0 80px;
}

.main-alt-bg {
    background: var(--bg-alt);
}

.legal-card {
    background: #fff;
    border-radius: var(--radius);
    border-top: 4px solid var(--teal);
    box-shadow: 0 4px 24px rgba(8, 74, 98, 0.08);
    padding: 48px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-card section + section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.legal-card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 12px;
}

.legal-card h2::before {
    content: "";
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--red);
}

.legal-card p {
    color: var(--text-muted);
    font-size: 15px;
}

.legal-card a {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
}

.legal-card a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 32px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .auth-card {
        padding: 28px 24px;
    }
    .legal-header {
        padding: 48px 0 36px;
    }
    .legal-header h1 {
        font-size: 26px;
    }
    .legal-card {
        padding: 28px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-toggle span,
    .main-nav.is-open,
    .main-nav.is-open a:not(.btn) {
        animation: none;
        transition: none;
        opacity: 1;
    }
}
