

/* ====================================================================================================================================
   THÈMES - Clair (défaut) et Nuit
   ==================================================================================================================================== */

/* THÈME CLAIR (défaut) - Bleu Océan */
:root {
    --primary: #0ea5e9;
    --primary-dark: #01354e;
    --primary-light: #013e58;
    --secondary: #00577c;
    --bg-body: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    --bg-card: #ffffff;
    --bg-navbar: #fffffffa;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    /* overflow-x: clip (pas hidden) : hidden forcerait overflow-y à
       "auto", ce qui casse position: sticky pour tous les descendants
       (ex. .dashboard-subnav) - clip garde la même protection anti-scroll
       horizontal sans cet effet de bord. */
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

html {
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Inter', sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    font-size: 16px;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: clip;
}

/* ====================================================================================================================================
   NAVBAR
   ==================================================================================================================================== */
.navbar-generator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);      /* léger voile blanc */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: .9rem 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Au scroll, on renforce l’opacité */
.navbar-generator.scrolled {
    background: var(--bg-navbar);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-generator .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Logo (colonne gauche) */
.logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    justify-self: start;
    grid-column: 1;
}

.brand-logo-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    color: var(--primary);
}

.brand-logo-text {
    font-weight: 750;
    font-size: 1.7rem;
    letter-spacing: -0.01em;
    color: var(--primary);
}

.brand-logo-accent {
    color: #10b981;
}

/* Menu Desktop (colonne centrale) */
.nav-links-generator {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    justify-self: center;
    grid-column: 2;
}

.nav-links-generator a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
}

.nav-icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.nav-links-generator a:hover .nav-icon {
    transform: translateY(-1px) scale(1.06);
}

.nav-links-generator a:hover {
    color: var(--primary);
}

.nav-links-generator a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Bouton menu mobile (colonne droite, réservée pour l'auth en desktop) */
.mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 10px;
    justify-self: end;
    grid-column: 3;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-toggle:hover {
    background: #f1ede5;
}

.mobile-toggle.active {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary);
}

.mobile-toggle i {
    transition: transform 0.2s ease;
}

/* ====================================================================================================================================
   NAVBAR - AUTHENTIFICATION (V2)
   ==================================================================================================================================== */
.nav-auth-generator {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    justify-self: end;
    grid-column: 3;
}

.nav-auth-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-auth-link:hover {
    color: var(--primary);
}

/* Actif sur la page de connexion - même principe que .nav-account-label.active.
   (Le lien "Connexion" replié dans le menu mobile hérite déjà de
   .nav-links-generator a.active, pas besoin de règle séparée pour lui.) */
.nav-auth-link.active {
    color: var(--primary);
}

/* Même principe que .nav-logout-btn (contour + texte colorés au repos,
   fond plein au survol) mais en bleu au lieu de rouge. */
.nav-auth-cta {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-auth-cta:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.nav-account-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-account-label:hover {
    color: var(--primary);
}

/* Actif sur les 4 pages du compte (Tableau de bord/Mes documents/Profil/
   Sécurité) - classe posée côté serveur dans documents/base.html, même
   principe que .dashboard-subnav-link.active. */
.nav-account-label.active {
    color: var(--primary);
}

.nav-logout-form {
    margin: 0;
}

/* Contour rouge + texte rouge au repos, fond rouge plein (texte blanc) au
   survol - même rouge que la modale de confirmation de déconnexion
   (.logout-modal-confirm) pour rester cohérent. */
.nav-logout-btn {
    background: transparent;
    border: 1px solid #ef4444;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-logout-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

/* Copie mobile : repliée par défaut, affichée uniquement dans le menu
   mobile (voir media query ci-dessous) - hérite du style des liens
   .nav-links-generator a puisqu'elle vit dans le même conteneur #navLinks. */
.nav-auth-mobile-generator {
    display: none;
}

/* ====================================================================================================================================
   RESPONSIVE MOBILE
   ==================================================================================================================================== */
@media (max-width: 768px) {
    .navbar-generator .container {
        padding: 0 0.75rem;
    }
    
    .brand-logo-icon {
        width: 30px;
        height: 30px;
    }

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

    .nav-links-generator {
        display: flex;
        grid-column: unset;
        justify-self: unset;
        position: fixed;
        top: 74px;
        left: 0;
        width: 100vw;
        margin: 0;
        height: auto;
        max-height: calc(100vh - 90px);
        background: var(--bg-card);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 0.75rem 1rem;
        border-top: 1px solid #e8e2d8;
        border-bottom: 1px solid #e8e2d8;
        box-shadow: var(--shadow-lg);
        gap: 0.25rem;
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        pointer-events: none;
        overflow-y: auto;
    }

    .nav-links-generator.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-links-generator a {
        padding: 1rem 1.1rem;
        width: 100%;
        border-radius: 12px;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .nav-links-generator a:hover {
        background: rgba(14, 165, 233, 0.06);
    }

    /* Volontairement pas de fond ni de bordure sur l'item actif - juste
       l'icône et le texte en bleu (héritent déjà de la règle .active
       partagée avec le desktop, ci-dessus), pour un menu mobile plus
       sobre. */

    .mobile-toggle {
        display: flex;
    }

    /* V2 : authentification - on cache la version desktop (colonne de
       droite) et on affiche la copie repliée dans le menu mobile, qui
       hérite déjà du style de .nav-links-generator a (padding, hover,
       etc.) puisqu'elle est nichée dans le même conteneur #navLinks. */
    .nav-auth-generator {
        display: none;
    }

    .nav-auth-mobile-generator {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-auth-mobile-generator .nav-account-label {
        padding: 1rem 1.1rem;
    }

    .nav-logout-btn {
        align-self: center;
        width: auto;
    }
}

/* ====================================================================================================================================
   MAIN CONTENT
   ==================================================================================================================================== */
.main-content {
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 78px; /* offset pour la navbar fixe agrandie */
}

@media (max-width: 768px) {
    .main-content {
        padding: 0 1rem 1rem;
    }
}

/* ====================================================================================================================================
   CARTES
   ==================================================================================================================================== */
.card-generator {
    background: var(--bg-card);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .card-generator {
        padding: 1.25rem;
        border-radius: 1rem;
    }
}

/* ====================================================================================================================================
   FORMULAIRES
   ==================================================================================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-control-generator {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 16px;
    transition: all 0.2s ease;
    background: var(--gray-100);
    color: var(--text-primary);
}

.form-control-generator:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: var(--bg-card);
}

.btn-generate {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ====================================================================================================================================
   FOOTER
   ==================================================================================================================================== */
.footer-generator {
    border-top: none;
    position: relative;
    padding: 2rem 0 1rem;
    margin-top: 5rem;
    box-shadow: 0 -10px 30px -15px rgba(0, 0, 0, 0.05);
    background: linear-gradient(160deg, #0f1b2e 0%, #0b1220 62%);
}
/* Ligne décorative en haut */
.footer-generator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1540px;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* Bloc CTA fusionné dans le footer */
.footer-cta {
    text-align: center;
    padding: 3rem 1rem 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 3rem;
}

.footer-cta-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.8rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.footer-cta-subtitle {
    max-width: 560px;
    margin: 0 auto 1.6rem;
    color: #a9b5b8;
    font-size: 1.05rem;
    line-height: 1.6;
}

.footer-cta-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 2rem;
}

.footer-cta-counter-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.footer-cta-counter-label {
    font-size: 0.85rem;
    color: #a9b5b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-cta-button-wrapper {
    display: flex;
    justify-content: center;
}

.footer-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    color: #7dd3fc;
    background: #0ea4e931;
    border: 1.5px solid #0ea4e981;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

/* Fond dégradé au survol (caché par défaut) */
.footer-cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 12px;
    z-index: -2;
}

.footer-cta-button:hover::before {
    opacity: 1;
}

/* Effet de brillance (sweep) */
.footer-cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 200%;
    height: 200%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.2), transparent 40%);
    transform: rotate(30deg);
    transition: transform 0.7s ease;
    pointer-events: none;
    z-index: -1;
}

.footer-cta-button:hover::after {
    transform: rotate(30deg) translateX(70%);
}

.footer-cta-button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.25);
    color: white !important;
}

.footer-cta-button:hover * {
    color: white !important;
}

.footer-cta-button i {
    transition: transform 0.2s ease;
}

.footer-cta-button:hover i {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .footer-cta {
        padding: 2.2rem 0.5rem 2.6rem;
    }
    .footer-cta-title {
        font-size: 1.6rem;
    }
    .footer-cta-subtitle {
        font-size: 0.9rem;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Logo et description */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo .brand-logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.footer-logo .brand-logo-text {
    font-size: 1.05rem;
    color: var(--primary);
}

.footer-logo .brand-logo-accent {
    color: #10b981;
}

.footer-logo:hover .brand-logo-icon {
    transform: scale(1.06);
}

.footer-desc {
    color: #a9b5b8;
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 250px;
}

/* Titres des colonnes */
.footer-generator h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #d8d8d8;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}
.footer-generator h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Liste des liens */
.footer-generator ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-generator ul li {
    margin-bottom: 0.6rem;
}

.footer-generator ul li a {
    color: #a9b5b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    display: inline-block;
    position: relative;
}

.footer-generator ul li a::before {
    content: '➔';
    position: absolute;
    left: -1.2rem;
    opacity: 0;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: var(--primary);
}

.footer-generator ul li a:hover {
    color: var(--primary);
    transform: translateX(6px);
}

.footer-generator ul li a:hover::before {
    opacity: 1;
    left: -1rem;
}

/* Réseaux sociaux */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a9b5b8;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .1);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 6px 12px #0ea5e940;
}

/* Icônes aux couleurs réelles de chaque réseau au repos, remplissage de
   la même couleur au survol - une identité de marque externe, pas un
   accent DocuSen (même logique que le logo YoonuJob). */
.social-links a.social-link-linkedin {
    color: #0a66c2;
}

.social-links a.social-link-linkedin:hover {
    background: #0a66c2;
    color: #fff;
    box-shadow: 0 6px 12px rgba(10, 102, 194, .35);
}

.social-links a.social-link-whatsapp {
    color: #25d366;
}

.social-links a.social-link-whatsapp:hover {
    background: #25d366;
    color: #fff;
    box-shadow: 0 6px 12px rgba(37, 211, 102, .35);
}

/* Footer bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    font-size: 0.75rem;
    color: #a9b5b8;
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 0.3rem;
     width: 100%;
}
/* Pour que la ligne sorte du conteneur et prenne toute la largeur */
.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60vw;
    height: 0.5px;
    border-top: 1px solid rgba(138, 138, 138, 0.25);
    pointer-events: none;
}
/* ============================================
   RESPONSIVE – FOOTER
   ============================================ */

@media (max-width: 768px) {
    .footer-generator {
        padding: 2rem 1rem 1.5rem;
        margin-top: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.8rem;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-generator h4 {
        display: inline-block;
    }
    
    .footer-generator h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-generator ul li a {
        padding-left: 0;
    }
    
    .footer-generator ul li a::before {
        display: none;
    }
    
    .footer-generator ul li a:hover {
        transform: translateX(0);
    }
    
    .social-links {
        justify-content: center;
    }
}

/* ====================================================================================================================================
   MODALE DE CONFIRMATION - DÉCONNEXION (V2)
   ==================================================================================================================================== */
.logout-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.2s ease, opacity 0.2s ease;
}

.logout-modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.logout-modal-container {
    background: var(--bg-card);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.logout-modal-overlay.active .logout-modal-container {
    transform: scale(1);
}

.logout-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.logout-modal-icon svg {
    width: 26px;
    height: 26px;
}

.logout-modal-container h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.logout-modal-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

.logout-modal-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.logout-modal-cancel,
.logout-modal-confirm {
    flex: 1;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.logout-modal-cancel {
    background: var(--gray-100);
    color: var(--text-primary);
}

.logout-modal-cancel:hover {
    background: var(--gray-200);
}

.logout-modal-confirm {
    background: #ef4444;
    color: #fff;
}

.logout-modal-confirm:hover {
    background: #dc2626;
}

@media (max-width: 480px) {
    .logout-modal-buttons {
        flex-direction: column;
    }
}

/* ====================================================================================================================================
   ANIMATIONS
   ==================================================================================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-generator {
    animation: fadeInUp 0.4s ease-out;
}


/* ============================================#########################################################################################################################""
   BOUTON RETOUR (commun à tous les formulaires)
   ============================================############################################################################################################################ */
.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-retour i {
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.btn-retour:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-4px);
}

.btn-retour:hover i {
    transform: translateX(-2px);
}

/* Groupe d’actions (retour + générer) */
.form-actions-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}


/* Style personnalisé pour les selects */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 14px;
    cursor: pointer;
}


/* ====================================================================================================================================
   RESPONSIVE MOBILE - COMPLÉMENTS OBLIGATOIRES
   ==================================================================================================================================== */

@media (max-width: 768px) {
    /* Grilles des formulaires */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Inputs plus grands (évite zoom auto sur iPhone) */
    input, 
    select, 
    textarea,
    .form-control,
    .form-control-generator {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    /* Boutons pleine largeur */
    .btn-generate,
    .action-btn,
    button[type="submit"],
    .btn-retour {
        width: 100%;
        padding: 14px !important;
        font-size: 16px !important;
        min-height: 48px;
        justify-content: center;
    }
    
    /* Groupe d'actions en colonne */
    .form-actions-group {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Tableau produits - scroll horizontal */
    .products-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-products {
        min-width: 600px;
    }
    
    .table-products th,
    .table-products td {
        padding: 8px;
        font-size: 12px;
    }
    
    /* Aperçu PDF */
    .pdf-preview iframe {
        height: 60vh;
    }
    
    /* Conteneurs */
    .attestation-container,
    .document-genere-container {
        padding: 15px;
    }
    
    /* Titres */
    .attestation-title {
        font-size: 1.5rem;
    }
    
    /* Grille d'actions */
    .action-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .action-grid .action-btn {
        width: 100%;
    }
    
    /* Message d'aide mobile */
    .mobile-hint {
        display: block;
        font-size: 12px;
        text-align: center;
        margin-bottom: 10px;
    }
}

/* Petit écran */
@media (max-width: 480px) {
    .attestation-title {
        font-size: 1.3rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 8px;
    }
}

/* Message d'aide mobile (caché par défaut) */
.mobile-hint {
    display: none;
}

/* Désactive le tap highlight sur mobile */
button,
a,
.btn-generate {
    -webkit-tap-highlight-color: transparent;
}


