/*
 * SmartSite! — Thème DevXpert (digital blue)
 * À importer APRÈS framework/smartsite.css
 *
 * 1.  Design tokens (palette + polices)
 * 2.  Sélection de texte
 * 3.  Typographie (ligne décorative)
 * 4.  Navigation
 * 5.  Hero
 * 6.  Composants (cards, features, steps, box-highlight)
 * 7.  Boutons
 * 8.  Contact & formulaires
 * 9.  Footer
 * 10. Hero sombre
 * 11. Corrections & ajustements
 * 12. FAQ
 * 13. Galerie — placeholder
 * 14. FeedForms — feedback & états
 * 15. Parcours étapes — responsive + connecteurs animés
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS — Palette SmartSite! (digital blue)
═══════════════════════════════════════════════════════════════════════════ */
:root {
    /* Couleurs de marque */
    --s2-color-primary:       #1a365d;
    --s2-color-primary-light: #ebf4ff;
    --s2-color-primary-dark:  #0f1f38;
    --s2-color-secondary:     #4a7ab5;
    --s2-color-accent:        #06b6d4;
    --s2-color-bg:            #ffffff;
    --s2-color-bg-alt:        #f0f7ff;
    --s2-color-text:          #2c3e50;
    --s2-color-text-muted:    #545b62;
    --s2-color-border:        rgba(0, 0, 0, 0.08);

    /* Polices */
    --s2-font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --s2-font-body:  'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Hero */
    --s2-hero-bg-from: #0f2b46;
    --s2-hero-bg-to:   #1a4a6e;

    /* Section padding */
    --s2-section-py: 6rem;

    /* Nav */
    --s2-nav-bg: #f0f7ff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. SÉLECTION DE TEXTE
═══════════════════════════════════════════════════════════════════════════ */
::selection {
    background-color: var(--s2-color-primary-light);
    color: var(--s2-color-primary-dark);
}


/* ═══════════════════════════════════════════════════════════════════════════
   3. TYPOGRAPHIE — Ligne décorative sur les titres de section
   La ligne suit la dernière ligne du titre grâce à display:inline sur h2.
   overflow:hidden sur le wrapper coupe la ligne (100vw) au bord du container.
═══════════════════════════════════════════════════════════════════════════ */
.s2-section-title {
    overflow: hidden;
}
.s2-section-title h2 {
    display: inline;
}
.s2-section-title h2::after {
    content: '';
    display: inline-block;
    vertical-align: middle;
    width: 100vw;
    height: 2px;
    background: linear-gradient(to right, var(--s2-color-primary), transparent);
    margin-left: 1.5rem;
    margin-bottom: 0.1em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. NAVIGATION — Polish visuel
═══════════════════════════════════════════════════════════════════════════ */

/* Fond léger teinté */
.s2-nav {
    background-color: var(--s2-color-bg-alt);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: none;
}
.s2-nav--overlay {
    background-color: transparent;
    border-bottom-color: transparent;
}

/* Liens : border-bottom au survol */
.s2-nav-links > li > a {
    border-bottom: 2px solid transparent;
    transition: color 0.22s ease, border-color 0.22s ease;
}
.s2-nav-links > li > a:hover {
    border-bottom-color: var(--s2-color-primary);
}

/* CTA : ombre colorée + transform */
.s2-nav-cta > a {
    box-shadow: 0 2px 8px rgba(35, 78, 65, 0.2);
}
.s2-nav-cta > a:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(35, 78, 65, 0.25) !important;
}

/* Dropdown : translateX au survol */
.s2-dropdown-menu li > a:hover {
    transform: translateX(4px);
}

/* Mobile : fond sur hover des liens */
@media (max-width: 991px) {
    .s2-nav-links > li > a {
        border-bottom: none;
    }
    .s2-nav-links > li > a:hover {
        border-bottom: none;
    }
    .s2-dropdown-menu li > a:hover {
        transform: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. HERO — Dégradé et typographie spécifique
═══════════════════════════════════════════════════════════════════════════ */
.s2-hero {
    background: linear-gradient(135deg, var(--s2-hero-bg-from) 0%, var(--s2-hero-bg-to) 100%);
    min-height: 62vh;
}

.s2-hero-title {
    font-weight: 800;
    letter-spacing: -2px;
}

/* Animations hero (éléments cachés par défaut, révélés par les classes d'animation) */
.s2-hero .s2-tagline      { opacity: 0; }
.s2-hero .s2-hero-title   { opacity: 0; }
.s2-hero .s2-hero-subtitle{ opacity: 0; }
.s2-hero .s2-hero-actions { opacity: 0; }

.s2-animate-fade-in-up {
    animation-fill-mode: both;
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. COMPOSANTS — Effets hover & Polish visuel
═══════════════════════════════════════════════════════════════════════════ */

/* Cards : hover lift */
.s2-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--s2-shadow-lg);
}

/* Features : hover lift */
.s2-feature:hover {
    transform: translateY(-6px);
    box-shadow: var(--s2-shadow-lg);
}

/* Icônes feature : rondes, colorées */
.s2-feature-icon {
    border-radius: 50%;
    background-color: var(--s2-color-primary-light);
    color: var(--s2-color-primary);
}
.s2-feature:hover .s2-feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Icône grande : fond blanc + ombre */
.s2-feature-icon--lg {
    background-color: var(--s2-color-bg);
    box-shadow: var(--s2-shadow);
}

/* Step icons : fond blanc + ombre */
.s2-step-icon {
    border-radius: 50%;
    background: var(--s2-color-bg);
    box-shadow: var(--s2-shadow);
    color: var(--s2-color-primary);
}

/* Box highlight : dégradé */
.s2-box-highlight {
    background: linear-gradient(135deg, var(--s2-color-primary-light) 0%, rgba(107, 177, 147, 0.07) 100%);
    border-color: rgba(35, 78, 65, 0.1);
    box-shadow: 0 2px 12px rgba(35, 78, 65, 0.07);
}


/* ═══════════════════════════════════════════════════════════════════════════
   7. BOUTONS — Ombres colorées & hover transforms
═══════════════════════════════════════════════════════════════════════════ */
.s2-btn--primary {
    box-shadow: 0 4px 10px rgba(35, 78, 65, 0.2);
}
.s2-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(35, 78, 65, 0.25);
}

.s2-btn--outline:hover {
    transform: translateY(-2px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. CONTACT — Polish
═══════════════════════════════════════════════════════════════════════════ */
.s2-contact-info {
    background-color: transparent;
}
.s2-contact-form {
    background-color: transparent;
}

/* Focus fields */
.s2-input:focus,
.s2-textarea:focus,
.s2-select:focus {
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.12);
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. FOOTER
═══════════════════════════════════════════════════════════════════════════ */
.s2-footer {
    background-color: var(--s2-color-primary-light);
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. HERO SOMBRE
═══════════════════════════════════════════════════════════════════════════ */
.s2-hero { color: #fff; }
.s2-hero .s2-hero-title { color: #fff; }
.s2-hero .s2-hero-subtitle { color: rgba(255,255,255,0.85); }
.s2-hero .s2-tagline { color: rgba(255,255,255,0.7); }
.s2-hero .s2-btn--outline { border-color: rgba(255,255,255,0.4); color: #fff; }
.s2-hero .s2-btn--outline:hover { border-color: #fff; background: rgba(255,255,255,0.1); }


/* ═══════════════════════════════════════════════════════════════════════════
   11. CORRECTIONS & AJUSTEMENTS
═══════════════════════════════════════════════════════════════════════════ */

/* Nav CTA : bouton compact, légèrement décalé à droite, responsive */
.s2-nav-cta a { padding: 0.35rem 0.9rem; font-size: clamp(0.7rem, 1.5vw, 0.85rem); margin-left: 0.75rem; }

/* Fix : s2-feature--row nécessite display:flex (modificateur de .s2-feature) */
.s2-feature--row { display: flex; }

/* Badges dans une card flex-col : ne pas étirer sur toute la largeur */
.s2-d-flex.s2-flex-col > .s2-badge { align-self: flex-start; }

/* Contact : réduire l'écart entre label et valeur */
.s2-contact-info .s2-font-medium { line-height: 1.2; margin-bottom: 0.1rem; }

/* Features row : augmenter l'espacement vertical */
.s2-d-flex.s2-flex-col > .s2-feature--row { margin-bottom: 0.5rem; }

/* Formulaire : supprimer gap entre label et input */
.s2-form-group { margin-bottom: 1rem; }
.s2-form-group .s2-label { margin-bottom: 0.25rem; }

/* Supprime l'espace réservé du framework sous le bouton d'envoi */
.s2-contact-form { padding-bottom: 2.5rem; }


/* ═══════════════════════════════════════════════════════════════════════════
   12. FAQ
═══════════════════════════════════════════════════════════════════════════ */
.faq-item {
    border: 1px solid var(--s2-color-border);
    border-radius: var(--s2-radius);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: box-shadow var(--s2-transition);
}
.faq-item:hover {
    box-shadow: var(--s2-shadow-sm);
}
.faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--s2-color-text);
    cursor: pointer;
    gap: 1rem;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    line-height: 1;
    color: var(--s2-color-primary);
    flex-shrink: 0;
    transition: transform var(--s2-transition);
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-item .faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--s2-color-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}
@media (max-width: 575px) {
    .faq-item summary { font-size: 0.88rem; padding: 0.85rem 1rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   13. GALERIE — Placeholder
═══════════════════════════════════════════════════════════════════════════ */
.example-placeholder {
    background: linear-gradient(135deg, var(--s2-color-primary-light) 0%, var(--s2-color-bg-alt) 100%);
    border: 2px dashed var(--s2-color-border);
    border-radius: var(--s2-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    color: var(--s2-color-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    padding: 2rem;
}
@media (max-width: 575px) {
    .example-placeholder { min-height: 160px; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   14. FEEDFORMS — Feedback & états
═══════════════════════════════════════════════════════════════════════════ */

/* Feedback pleine largeur sous les deux colonnes */
#contactFeedback {
    position: static; /* annule le position:absolute du framework */
    grid-column: 1 / -1;
    margin: 0;
    border-top: 1px solid var(--s2-color-border);
    border-radius: 0 0 var(--s2-radius-lg) var(--s2-radius-lg);
    padding: 0.6rem 2.5rem;
    bottom: auto; left: auto; right: auto;
}

/* FeedForms : feedback en flux normal */
.s2-feedback {
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    animation: s2-fadeIn 0.3s ease;
}
.feedforms-spinner {
    display: inline-block;
    width: 1em; height: 1em;
    margin-right: 0.5em;
    vertical-align: -0.125em;
    animation: feedforms-spin 1s linear infinite;
}
@keyframes feedforms-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.form-submitted { opacity: 0.6; pointer-events: none; }
.s2-feedback.feedback-processing {
    display: block;
    background-color: #f8f9fa;
    color: var(--s2-color-text-muted);
    border: 1px solid var(--s2-color-border);
}
.s2-feedback.feedback-success {
    display: block;
    background-color: #bde6d1;
    color: #065f46;
    border: 1px solid #93dfbc;
}
.s2-feedback.feedback-error {
    display: block;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}


/* ═══════════════════════════════════════════════════════════════════════════
   15. PARCOURS ÉTAPES — Responsive + connecteurs animés
═══════════════════════════════════════════════════════════════════════════ */

/* Pastille relative pour positionnement du drapeau */
.s2-steps--process .s2-step-icon {
    position: relative;
    z-index: 2;
}

/* Grille : 4 col desktop, 2×2 tablette, 1 col mobile */
.s2-steps--process { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 899px) {
    .s2-steps--process { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 479px) {
    .s2-steps--process { grid-template-columns: 1fr; }
}

/* Connecteurs visuels (desktop) */
@media (min-width: 900px) {
    .s2-steps--process { position: relative; }
    .s2-steps--process > div { position: relative; z-index: 2; }

    /* Ligne centrale animée */
    .s2-steps--process::after {
        content: '';
        position: absolute;
        top: 35px;
        left: calc(12.5% + 2.75rem);
        right: calc(12.5% + 3.25rem);
        height: 2px;
        transform: translateY(-50%);
        background: repeating-linear-gradient(
            90deg,
            rgba(6, 182, 212, 0.45) 0px,
            rgba(6, 182, 212, 0.45) 8px,
            transparent 8px,
            transparent 16px
        );
        background-size: 16px 2px;
        animation: dash-move 1.2s linear infinite;
        z-index: 0;
    }
    @keyframes dash-move {
        from { background-position: 0 0; }
        to   { background-position: 16px 0; }
    }

    /* Marqueur de départ (pastille pleine) */
    .s2-steps--process::before {
        content: '';
        position: absolute;
        top: 35px;
        left: calc(12.5% + 2.3rem);
        transform: translate(-50%, -50%);
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(6, 182, 212, 0.95);
        box-shadow: 0 0 0 6px rgba(6,182,212,0.06);
        z-index: 1;
    }

    /* Marqueur d'arrivée (losange) */
    .s2-steps--process > div:last-child::before {
        content: '';
        position: absolute;
        top: 35px;
        left: calc(50% - 2.9rem);
        transform: translate(-50%, -50%) rotate(45deg);
        width: 12px;
        height: 12px;
        background: rgba(6, 182, 212, 0.95);
        z-index: 3;
    }

    /* Supprimer l'ancien pseudo-élément ::after du div:last-child */
    .s2-steps--process > div:last-child::after {
        content: none;
    }
}

/* Drapeau d'arrivée — pas d'éléments animés */
.s2-steps--process > div:last-child .s2-step-icon::before { content: none; }
.s2-steps--process > div:last-child .s2-step-icon::after { display: none; }
