/* ─────────────────────────────────────────────
   common.css — Sella Conseils
   Contenu :
   - Fonts
   - Variables CSS (:root)
   - Reset / global
   - Navbar (.sella-nav)
   - Footer (.sella-footer)
   - Hero pages internes (.page-hero)
   - Boutons communs (.btn-red, .btn-outline)
   - Tags / badges (.tag)
   - Flash toasts (.flash-container)
   - Classes utilitaires
───────────────────────────────────────────── */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Outfit:wght@300;400;500;600&display=swap');

/* ── VARIABLES ── */
:root {
    --red: #cc1f1f;
    --red-dark: #a51818;
    --red-light: #e84444;
    --gray-900: #1a1a1a;
    --gray-700: #333;
    --gray-500: #666;
    --gray-300: #999;
    --gray-100: #e8e8e8;
    --border: rgba(0,0,0,0.09);
    --font-display: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

/* ── RESET / GLOBAL ── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--gray-700);
    overflow-x: hidden;
}

/* ── NAVBAR ── */
.sella-nav {
    min-height: 7vh;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1030;
    height: 110px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 64px;
}

.sella-nav-logo img { height: 100px; }

.sella-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0; padding: 0;
}

.sella-nav-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color .2s;
}

.sella-nav-links a:hover,
.sella-nav-links a.active { color: var(--red); }
.sella-nav-links a.active { font-weight: 500; }

.sella-nav-links .nav-item { position: relative; }

.sella-nav-links .nav-item button.nav-link {
    background: none; border: none; padding: 0; margin: 0;
    color: var(--gray-500);
    font-family: var(--font-body);
    font-size: 14px; font-weight: 400;
    cursor: pointer; transition: color .2s;
    display: flex; align-items: center; gap: 4px;
}

.sella-nav-links .nav-item button.nav-link:hover,
.sella-nav-links .nav-item button.nav-link.show { color: var(--red); }

.sella-nav-links .dropdown-menu {
    position: absolute;
    top: calc(100% + 16px); left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 12px 40px rgba(0,0,0,.08);
    padding: 8px 0; margin: 0; z-index: 1031;
}

.sella-nav-links .dropdown-menu .dropdown-item {
    font-family: var(--font-body);
    font-size: 14px; font-weight: 400;
    color: var(--gray-500);
    padding: 10px 20px;
    transition: all .15s;
    text-decoration: none;
}

.sella-nav-links .dropdown-menu .dropdown-item:hover {
    background: rgba(204,31,31,.05);
    color: var(--red);
    padding-left: 24px;
}

.sella-nav-cta {
    background: var(--red); color: #fff;
    padding: 10px 24px; border-radius: 3px;
    font-size: 14px; font-weight: 500;
    text-decoration: none; transition: background .2s;
    white-space: nowrap;
}
.sella-nav-cta:hover { background: var(--red-dark); color: #fff; }

.sella-nav-actions { display: flex; align-items: center; gap: 12px; }

.sella-nav-login {
    color: var(--gray-500); text-decoration: none;
    font-size: 14px; font-weight: 400;
    padding: 10px 20px;
    border: 1px solid var(--gray-100);
    border-radius: 3px; transition: all .2s;
}
.sella-nav-login:hover { color: var(--red); border-color: var(--red); }

/* ── COMPTE ADMIN ── */
.sella-nav-account {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid var(--gray-100);
    border-radius: 40px;
    padding: 5px 14px 5px 5px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    width: auto;
    white-space: nowrap;
}

.sella-nav-account:hover {
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Cercle avec initiale */
.sella-nav-avatar {
    width: 32px;
    height: 32px;
    background: var(--red);
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Texte à droite de l'avatar */
.sella-nav-account-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.sella-nav-account-role {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    font-family: var(--font-body);
}

.sella-nav-account-email {
    font-size: 14px;
    color: var(--gray-300);
    font-family: var(--font-body);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chevron */
.sella-nav-account-chevron {
    width: 14px;
    height: 14px;
    color: var(--gray-300);
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

/* Dropdown */
.sella-nav-logout {
    color: var(--red) !important;
}
.sella-nav-logout:hover {
    background: rgba(204,31,31,0.05) !important;
}

.sella-nav-actions .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 180px;
    top: calc(100% + 8px);
}

.sella-nav-actions .nav-item {
    position: relative;
}

main {
    padding-top: 90px;
    min-height: 83vh;
}

/* ── BURGER ── */
.sella-nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 1100;
    flex-shrink: 0;
}

.sella-nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gray-700);
    transition: transform 0.25s, opacity 0.25s;
    border-radius: 1px;
}

.sella-nav.is-open .sella-nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.sella-nav.is-open .sella-nav-burger span:nth-child(2) {
    opacity: 0;
}
.sella-nav.is-open .sella-nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Wrapper transparent sur desktop */
.sella-nav-collapse {
    display: contents;
}

/* ── RESPONSIVE NAVBAR ── */
@media (max-width: 991px) {
    .sella-nav {
        padding: 0 20px;
        height: 72px;
    }

    .sella-nav-logo img { height: 56px; }

    .sella-nav-burger { display: flex; }

    main { padding-top: 72px; }

    .sella-nav-collapse {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 0 20px 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
        z-index: 1029;
        gap: 0;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .sella-nav.is-open .sella-nav-collapse {
        display: flex;
    }

    /* Links verticaux */
    .sella-nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .sella-nav-links > li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .sella-nav-links > li:first-child {
        border-top: 1px solid var(--border);
        margin-top: 16px;
    }

    .sella-nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 14px;
    }

    .sella-nav-links .nav-item button.nav-link {
        width: 100%;
        padding: 12px 0;
        font-size: 14px;
        justify-content: space-between;
    }

    /* Dropdowns inline sur mobile */
    .sella-nav-links .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 8px 12px;
        min-width: 0;
        width: 100%;
    }

    .sella-nav-links .dropdown-menu .dropdown-item {
        padding: 8px 0;
        font-size: 14px;
    }

    .sella-nav-links .dropdown-menu .dropdown-item:hover {
        padding-left: 4px;
        background: none;
        color: var(--red);
    }

    /* Actions (CTA + login) */
    .sella-nav-actions {
        width: 100%;
        border-top: 1px solid var(--border);
        padding-top: 16px;
        margin-top: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sella-nav-cta,
    .sella-nav-login {
        text-align: center;
        justify-content: center;
        display: block;
    }

    .sella-nav-account {
        width: 100% !important;
        border-radius: 6px;
    }

    /* Dropdown compte admin */
    .sella-nav-actions .dropdown-menu {
        position: static !important;
        transform: none !important;
        right: auto;
        left: auto;
        top: auto;
        width: 100%;
    }
}

/* ── FOOTER ── */
.sella-footer {
    background: var(--gray-900);
    padding: 64px 64px 36px;
    min-height: 10vh;
}

.sella-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
}

.sella-footer-brand img {
    height: 150px;
    margin-bottom: 14px;
    display: block;
}

.sella-footer-brand p {
    font-size: 14px;
    color: #fff;
    line-height: 1.8;
    max-width: 2200px;
}

.sella-footer-col h4 {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 500;
}

.sella-footer-col ul { list-style: none; padding: 0; margin: 0; }
.sella-footer-col li { margin-bottom: 8px; }

.sella-footer-col a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}
.sella-footer-col a:hover { color: var(--red-light); }

.sella-footer-bar {
    grid-column: 1 / -1;
    padding-top: 28px;
    border-top: 1px solid #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #fff;
}

.sella-footer-admin {
    color: inherit; text-decoration: none;
    font-size: 14px; letter-spacing: 1px;
    opacity: 0.18; transition: opacity .2s;
}
.sella-footer-admin:hover { opacity: 0.5; color: inherit; }

.footer-social-minimal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.social-icon-minimal {
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.social-icon-minimal:hover {
    opacity: 0.7;
    color: #fff;
}


/* ═══════════════════════════════════════════
   CLASSES COMMUNES — utilisées sur plusieurs pages
═══════════════════════════════════════════ */

/* ── HERO PAGES INTERNES ── */
/* Utilisé par : offres, mentions légales, confidentialité... */
.page-hero {
    background: var(--gray-900);
    padding: 80px 64px 60px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(204,31,31,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero-eyebrow {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 500;
    margin-bottom: 16px;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.15;
}

.page-hero p {
    color: rgba(255,255,255,0.38);
    font-size: 14px;
    margin-top: 16px;
}

/* Lien retour dans les héros */
.page-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color .2s;
}
.page-hero-back:hover { color: rgba(255,255,255,0.7); }
.page-hero-back svg { width: 14px; height: 14px; }


/* ── BOUTONS ── */
.btn-red {
    display: inline-block;
    background: var(--red);
    color: #fff;
    padding: 12px 28px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s;
    font-family: var(--font-body);
}
.btn-red:hover { background: var(--red-dark); color: #fff; }

.btn-red--block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-outline-dark {
    display: inline-block;
    background: transparent;
    color: rgba(255,255,255,0.5);
    padding: 12px 28px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    transition: all .2s;
    font-family: var(--font-body);
}
.btn-outline-dark:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

.btn-outline-dark--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Bouton blanc sur fond rouge */
.reseau-cta-block--red .btn-outline-dark {
    background: #fff;
    color: var(--red);
    border-color: #fff;
}

.reseau-cta-block--red .btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.90);
    color: var(--red-dark);
    border-color: #fff;
}

/* ── TAGS / BADGES ── */
.tag {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 2px;
}
.tag--red { background: var(--red); color: #fff; }
.tag--dark { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); }
.tag--gray { background: #f3f3f3; color: var(--gray-700); border: 1px solid var(--border); }


/* ── BLOC INFO (encadré avec bordure gauche rouge) ── */
/* Utilisé par : mentions légales, confidentialité */
.info-block {
    background: #f8f8f8;
    border-left: 3px solid var(--red);
    padding: 20px 24px;
    border-radius: 0 4px 4px 0;
    margin-top: 16px;
}
.info-block p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--gray-700);
}
.info-block strong { color: var(--gray-900); font-weight: 500; }
.info-block a { color: var(--red); }


/* ── LABEL DE SECTION ── */
/* Utilisé sur toutes les pages pour les petits labels rouges */
.section-label {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 500;
    margin-bottom: 10px;
}

/* Label avec tirets (— texte —) */
.label-section-dark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}

.label-section-dark::before,
.label-section-dark::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--red);
}


/* ── TABLEAU COMMUN ── */
/* Utilisé par : confidentialité */
.sella-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}
.sella-table th {
    background: var(--gray-900);
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.sella-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--gray-500);
    line-height: 1.6;
}
.sella-table tr:last-child td { border-bottom: none; }
.sella-table tr:nth-child(even) td { background: #fafafa; }

/* ── RESPONSIVE FOOTER ── */
@media (max-width: 991px) {
    .sella-footer {
        padding: 48px 32px 32px;
    }

    .sella-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .sella-footer-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 575px) {
    .sella-footer {
        padding: 40px 20px 24px;
    }

    .sella-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sella-footer-brand img {
        height: 100px;
    }
}

/* ── RESPONSIVE PAGE HERO ── */
@media (max-width: 768px) {
    .page-hero {
        padding: 48px 20px 40px;
    }
}
/* ── FLASH TOASTS ── */
.flash-container {
    position: fixed;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.flash-toast {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    min-width: 320px;
    max-width: 560px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.flash-success {
    background: #f0faf4;
    border-left: 4px solid #2e7d52;
    color: #1a4a30;
}

.flash-warning {
    background: #fffbf0;
    border-left: 4px solid #b07d2a;
    color: #5a3d00;
}

.flash-error {
    background: #fff0f0;
    border-left: 4px solid var(--red);
    color: #7a1010;
}

.flash-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.5;
    padding: 0 0 0 8px;
    color: inherit;
}

.flash-close:hover { opacity: 1; }
