/* ============================================
   SECURE EXCHANGES — Design System
   Charte graphique v9 (Marie-Claude Mercier)
   ============================================ */

/* ============================================
   1. DESIGN TOKENS
   ============================================ */
:root {
    /* --- Palette de couleurs (charte v9 — couleurs exactes PDF) --- */
    --se-orange: #EE6525;
    --se-orange-dark: #D55A1F;
    --se-orange-light: #F47D45;
    --se-orange-bg: rgba(238, 101, 37, 0.08);
    --se-orange-border: rgba(238, 101, 37, 0.2);

    --se-navy: #1D2A39;
    --se-navy-light: #273545;
    --se-navy-dark: #111C27;

    --se-gray-blue: #3F4A57;
    --se-gray: #3F4A57;
    --se-gray-light: #FAFAFA;
    --se-gray-border: #FAFAFA;

    --se-beige: #FAFAFA;
    --se-offwhite: #FAFAFA;
    --se-white: #FFFFFF;

    /* Couleurs sémantiques */
    --se-success: #28A745;
    --se-warning: #FFA500;
    --se-danger: #DC3545;

    /* Couleurs de tiers (palette charte) */
    --tier-eco: #F47D45;
    --tier-eco-bg: rgba(244, 125, 69, 0.08);
    --tier-advanced: #EE6525;
    --tier-advanced-bg: rgba(238, 101, 37, 0.08);
    --tier-pro: #1D2A39;
    --tier-pro-bg: rgba(29, 42, 57, 0.06);

    /* --- Typographie --- */
    --font-heading: 'Bebas Neue', sans-serif;
    --font-body: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* --- Border Radius (charte carrée — 0 partout sauf navbar) --- */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --radius-xl: 0;
    --radius-pill: 0;
    --radius-circle: 50%;

    /* --- Shadows (4 niveaux) --- */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 16px 50px rgba(0, 0, 0, 0.14);
    --shadow-orange: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-orange-lg: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* --- Spacing --- */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 60px;
    --space-2xl: 80px;
    --space-3xl: 100px;

    /* --- Transitions --- */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Layout --- */
    --container-max: 1300px;
    --container-narrow: 900px;
    --container-wide: 1400px;
}

/* ============================================
   2. BASE RESET & TYPOGRAPHY
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body:not(.stretched) {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--se-navy);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body:not(.stretched) h1,
body:not(.stretched) h2,
body:not(.stretched) h3,
body:not(.stretched) h4,
body:not(.stretched) h5,
body:not(.stretched) h6 {
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin: 0;
}

body:not(.stretched) h1 {
    letter-spacing: 0.02em;
}

body:not(.stretched) p {
    margin-top: 0;
    margin-bottom: var(--space-sm);
}

/* Link colors managed by individual components (header-footer.css, feature-page.css, etc.)
   to avoid overriding context-specific colors (footer white links, CTA button text, etc.) */

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   3. LAYOUT
   ============================================ */
body:not(.stretched) .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   4. BUTTONS
   ============================================ */

/* Primary — Orange gradient (CTA principal) — scoped to V2 pages */
body:not(.stretched) .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--se-orange) 0%, var(--se-orange-dark) 100%);
    color: var(--se-white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-orange);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

body:not(.stretched) .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

body:not(.stretched) .btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

body:not(.stretched) .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange-lg);
    color: var(--se-white);
}

body:not(.stretched) .btn-primary:active {
    transform: translateY(0);
}

body:not(.stretched) .btn-primary span,
body:not(.stretched) .btn-primary i {
    position: relative;
    z-index: 1;
}

/* Secondary — White/light avec bordure — scoped to V2 pages */
body:not(.stretched) .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--se-white);
    color: var(--se-orange);
    border: 2px solid var(--se-orange);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    white-space: nowrap;
}

body:not(.stretched) .btn-secondary:hover {
    background: var(--se-orange);
    color: var(--se-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
}

/* Outline — Transparent avec bordure blanche (sur fond sombre) */
body:not(.stretched) .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: var(--se-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    white-space: nowrap;
}

body:not(.stretched) .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--se-white);
    transform: translateY(-2px);
}

/* Button sizes */
body:not(.stretched) .btn-sm {
    padding: 10px 20px;
    font-size: 13px;
}

body:not(.stretched) .btn-lg {
    padding: 18px 40px;
    font-size: 16px;
}

/* ============================================
   5. CARDS
   ============================================ */

/* Card de base */
.card {
    background: var(--se-white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--se-gray-border);
    transition: all var(--transition-smooth);
}

/* Card avec hover effect */
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* Card avec accent orange (bord gauche) */
.card-accent {
    border-left: 4px solid var(--se-orange);
}

/* Card avec accent orange (bord bas) */
.card-accent-bottom {
    border-bottom: 3px solid var(--se-orange);
}

/* Card sur fond sombre */
.card-dark {
    background: var(--se-navy);
    color: var(--se-white);
    border-color: rgba(255, 255, 255, 0.08);
}

.card-dark:hover {
    border-color: var(--se-gray-border);
}

/* ============================================
   6. ICON BOXES
   ============================================ */

/* Icon container rond (dans les cards) */
.icon-box {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--se-orange);
    font-size: 22px;
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.icon-box-sm {
    width: 40px;
    height: 40px;
    font-size: 16px;
    border-radius: var(--radius-sm);
}

.icon-box-lg {
    width: 70px;
    height: 70px;
    font-size: 28px;
    border-radius: var(--radius-lg);
}

/* Icon box avec fond orange plein */
.icon-box-filled {
    background: linear-gradient(135deg, var(--se-orange), var(--se-orange-dark));
    color: var(--se-white);
}

/* ============================================
   7. SECTION TITLES
   ============================================ */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--space-xl);
    color: var(--se-navy);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--se-orange);
    border-radius: 2px;
    margin: 16px auto 0;
}

.section-subtitle {
    text-align: center;
    color: var(--se-gray);
    font-size: 1.1rem;
    max-width: 700px;
    margin: -30px auto var(--space-xl);
    line-height: 1.7;
}

/* ============================================
   8. BADGES & PILLS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-orange {
    background: var(--se-orange-bg);
    color: var(--se-orange);
    border: 1px solid var(--se-orange-border);
}

.badge-navy {
    background: rgba(26, 42, 58, 0.08);
    color: var(--se-navy);
    border: 1px solid rgba(26, 42, 58, 0.15);
}

.badge-success {
    background: rgba(40, 167, 69, 0.08);
    color: var(--se-success);
    border: 1px solid rgba(40, 167, 69, 0.15);
}

/* ============================================
   9. FORM ELEMENTS — scoped to V2 pages only
   ============================================ */
body:not(.stretched) .form-group {
    margin-bottom: 20px;
}

body:not(.stretched) .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--se-navy);
    margin-bottom: 7px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--se-gray-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--se-navy);
    background: var(--se-offwhite);
    transition: all var(--transition-base);
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: var(--se-orange);
    background: var(--se-white);
    box-shadow: 0 0 0 4px rgba(29, 42, 57, 0.1);
}

.form-input::placeholder {
    color: var(--se-gray);
}

/* ============================================
   10. HERO SECTIONS
   ============================================ */

/* Hero fond sombre (Navy) — standard pour la plupart des pages */
.hero-dark {
    background: linear-gradient(135deg, var(--se-navy) 0%, var(--se-navy-light) 50%, var(--se-navy) 100%);
    color: var(--se-white);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-dark::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: none;
    border-radius: var(--radius-circle);
    pointer-events: none;
}

.hero-dark::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: none;
    border-radius: var(--radius-circle);
    pointer-events: none;
}

/* Hero fond clair */
.hero-light {
    background: linear-gradient(135deg, var(--se-offwhite) 0%, var(--se-gray-light) 100%);
    color: var(--se-navy);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-light::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: none;
    border-radius: var(--radius-circle);
    pointer-events: none;
}

/* ============================================
   11. SECTION BACKGROUNDS
   ============================================ */
.section-light {
    background: var(--se-offwhite);
    padding: var(--space-2xl) 0;
}

.section-white {
    background: var(--se-white);
    padding: var(--space-2xl) 0;
}

.section-dark {
    background: var(--se-navy);
    color: var(--se-white);
    padding: var(--space-2xl) 0;
}

.section-beige {
    background: var(--se-beige);
    padding: var(--space-2xl) 0;
}

/* --- Force white text in all dark contexts ---
   Required because style.min.css sets h1-h6 { color: #1d1d1b }
   which overrides CSS inheritance from parent sections. */
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5, .section-dark h6,
.section-dark p, .section-dark li, .section-dark span,
.hero-dark h1, .hero-dark h2, .hero-dark h3,
.hero-dark h4, .hero-dark h5, .hero-dark h6,
.hero-dark p, .hero-dark li, .hero-dark span,
.cta-section h1, .cta-section h2, .cta-section h3,
.cta-section h4, .cta-section h5, .cta-section h6,
.cta-section p, .cta-section li, .cta-section span,
.card-dark h1, .card-dark h2, .card-dark h3,
.card-dark h4, .card-dark h5, .card-dark h6,
.card-dark p, .card-dark li, .card-dark span {
    color: var(--se-white);
}

.section-dark .section-title::after,
.hero-dark .section-title::after,
.cta-section .section-title::after {
    background: var(--se-orange);
}

/* ============================================
   12. FEATURE LISTS
   ============================================ */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: var(--se-gray-blue);
}

.feature-list li i {
    color: var(--se-orange);
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.feature-list-check li i {
    color: var(--se-success);
}

/* ============================================
   13. ACCENT LINES (charte: orange = SE presence)
   ============================================ */
.accent-line-left {
    border-left: 4px solid var(--se-orange);
    padding-left: var(--space-md);
}

.accent-line-top {
    border-top: 4px solid var(--se-orange);
    padding-top: var(--space-md);
}

.accent-line-bottom::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--se-orange);
    border-radius: 2px;
    margin-top: var(--space-sm);
}

/* ============================================
   14. CTA SECTIONS
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, var(--se-navy) 0%, var(--se-navy-light) 100%);
    color: var(--se-white);
    padding: var(--space-xl) 0;
    text-align: center;
}

.cta-section .section-title {
    color: var(--se-white);
}

.cta-section .section-title::after {
    background: var(--se-orange);
}

/* ============================================
   15. GRIDS
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* ============================================
   16. CANADA BANNER (shared)
   ============================================ */
.canada-banner {
    background: linear-gradient(135deg, var(--se-navy) 0%, var(--se-navy-light) 100%);
    color: var(--se-white);
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.canada-banner strong {
    color: var(--se-orange);
}

/* ============================================
   17. PHOTO ANGLE — Coupe 13° bas-droite
   ============================================ */

/* Coupe angulaire 13° sur le coin bas-droit des photos
   Calcul : tan(13°) ≈ 0.231
   Pour image 3:2 : w=20%, h=7% → angle ≈ 13° */
.photo-angle {
    clip-path: polygon(0 0, 100% 0, 100% 93%, 80% 100%, 0 100%);
}

/* ============================================
   18. SHIELD ICON STACK — Bouclier + icône feature
   ============================================ */

/* Fix FA brand icons — Force la font-family Brands car le CSS de base
   FA 7 Pro assigne "Font Awesome 7 Pro" à tous les styles incluant .fa-brands.
   On force "Font Awesome 7 Brands" pour les icônes de marque.
   On définit aussi --fa pour chaque icône de marque utilisée,
   car le Kit FA 7 utilise content: var(--fa) qui serait vide sinon. */
.fa-brands,
.fab {
    font-family: "Font Awesome 7 Brands" !important;
}
.fa-brands.fa-microsoft::before,
.fab.fa-microsoft::before {
    content: "\f3ca" !important;
}
.fa-brands.fa-google::before,
.fab.fa-google::before {
    content: "\f1a0" !important;
}
.fa-brands.fa-windows::before,
.fab.fa-windows::before {
    content: "\f17a" !important;
}
.fa-brands.fa-chrome::before,
.fab.fa-chrome::before {
    content: "\f268" !important;
}
.fa-brands.fa-youtube::before,
.fab.fa-youtube::before {
    content: "\f167" !important;
}

/* Stack FA : shield en fond + icône feature au centre
   Usage : <span class="fa-stack fa-2x shield-stack">
             <i class="fa-thin fa-shield fa-stack-2x"></i>
             <i class="fa-thin fa-paper-plane fa-stack-1x"></i>
           </span> */
.shield-stack {
    vertical-align: middle;
}

.shield-stack .fa-shield {
    color: var(--se-orange);
}

.shield-stack .fa-stack-1x {
    font-size: 0.65em;
    color: var(--se-orange);
    transform: translateY(-6%);
    -webkit-text-stroke: 0.3px var(--se-orange);
    text-stroke: 0.3px var(--se-orange);
}

/* ============================================
   19. RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 2rem;
    }

    :root {
        --space-2xl: 60px;
        --space-3xl: 80px;
    }
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    :root {
        --space-2xl: 40px;
        --space-3xl: 50px;
    }
}

/* ============================================
   Mobile < 480px
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    :root {
        --space-xl: 30px;
        --space-2xl: 30px;
        --space-3xl: 40px;
    }

    /* Buttons: full width on mobile */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    /* Form inputs */
    .form-input {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Icon boxes */
    .icon-box {
        width: 44px;
        height: 44px;
    }

    .icon-box-sm {
        width: 32px;
        height: 32px;
    }

    /* Hero dark sections */
    .hero-dark {
        padding: var(--space-2xl) 0;
    }
}