/* ========================================= */
/* CONTACT - VERSION ULTRA-OPTIMISÉE RESPONSIVE */
/* Design Premium - Performance Maximale */
/* LIGHT MODE UNIQUEMENT */
/* ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=Lato:wght@300;400;600;700&display=swap');

/* ========================================= */
/* 1. VARIABLES CSS - LIGHT MODE */
/* ========================================= */

:root {
    /* Couleurs */
    --color-primary: #2C3E50;
    --color-secondary: #34495E;
    --color-accent: #D4AF37;
    --color-accent-light: #E8C468;
    --color-background: #FAF9F6;
    --color-card: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-light: #6C7A89;
    --color-border: #E5E5E5;
    --color-success: #27AE60;
    --color-error: #E74C3C;
    --color-warning: #F39C12;
    --color-info: #3498DB;
    
    /* Typographie */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', 'Helvetica Neue', sans-serif;
    
    /* Spacing Responsive */
    --spacing-xs: clamp(0.4rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.75rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 2.5vw, 1.5rem);
    --spacing-lg: clamp(1.5rem, 4vw, 2.5rem);
    --spacing-xl: clamp(2rem, 6vw, 4rem);
    
    /* Border Radius Responsive */
    --radius-sm: clamp(3px, 0.5vw, 4px);
    --radius-md: clamp(6px, 1vw, 8px);
    --radius-lg: clamp(8px, 1.5vw, 12px);
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.12);
    --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.16);
    --shadow-focus: 0 0 0 3px rgba(212, 175, 55, 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    /* Z-index */
    --z-watermark: -1;
    --z-fixed: 1000;
    --z-toast: 3000;
}

/* ========================================= */
/* 2. RESET & BASE */
/* ========================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-background);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

/* Filigrane Optimisé */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(40vw, 60vw, 800px);
    height: clamp(40vh, 60vh, 600px);
    background-image: url('../image/LOGO FCS.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    filter: grayscale(100%) opacity(0.02);
    z-index: var(--z-watermark);
    pointer-events: none;
}

/* Désactiver filigrane sur mobile */
@media (max-width: 768px) {
    body::after {
        display: none;
    }
}

/* ========================================= */
/* 3. BOUTON RETOUR - RESPONSIVE */
/* ========================================= */

.back-button-fixed {
    position: fixed;
    top: clamp(15px, 3vw, 30px);
    left: clamp(15px, 3vw, 30px);
    z-index: var(--z-fixed);
}

.back-button-fixed .back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(45px, 8vw, 55px);
    height: clamp(45px, 8vw, 55px);
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--color-primary);
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

@media (hover: hover) {
    .back-button-fixed .back-link:hover {
        background: var(--color-accent);
        color: white;
        border-color: var(--color-accent);
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
}

.back-button-fixed .back-link:active {
    transform: translateY(-2px);
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .back-button-fixed .back-link {
        width: clamp(50px, 10vw, 60px);
        height: clamp(50px, 10vw, 60px);
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========================================= */
/* 4. SECTION CONTACT - RESPONSIVE */
/* ========================================= */

.contact-section {
    min-height: 100vh;
    padding: clamp(80px, 15vh, 120px) clamp(4%, 5vw, 5%) clamp(40px, 10vh, 80px);
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================= */
/* 5. HEADER - RESPONSIVE */
/* ========================================= */

.contact-header {
    text-align: center;
    margin-bottom: clamp(40px, 10vw, 80px);
    animation: fadeInUp 0.6s ease-out;
}

.contact-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: var(--spacing-lg);
    line-height: 1.2;
}

.contact-header h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(60px, 15vw, 100px);
    height: clamp(2px, 0.5vw, 3px);
    background: var(--color-accent);
}

.contact-header p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    padding: 0 var(--spacing-sm);
}

/* ========================================= */
/* 6. ONGLETS - ULTRA RESPONSIVE */
/* ========================================= */

.tabs-container {
    margin: 0 0 clamp(30px, 8vw, 60px) 0;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 2px solid var(--color-border);
    animation: fadeInUp 0.7s ease-out 0.1s backwards;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-bottom: 3px solid var(--color-accent);
}

.tab-button {
    flex: 1 1 auto;
    min-width: 150px;
    padding: clamp(14px, 3vw, 20px) clamp(16px, 4vw, 25px);
    background: transparent;
    border: none;
    cursor: default;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 700;
    font-family: var(--font-heading);
    color: white;
    transition: var(--transition);
    position: relative;
    text-align: center;
    letter-spacing: 0.5px;
    word-break: break-word;
    -webkit-tap-highlight-color: transparent;
}

.tab-button i {
    margin-right: clamp(6px, 1.5vw, 10px);
    color: var(--color-accent);
    font-size: clamp(1rem, 2vw, 1.2rem);
    display: inline-block;
}

.tab-button.active {
    background: rgba(212, 175, 55, 0.15);
}

/* Stack vertical sur mobile */
@media (max-width: 640px) {
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-button {
        min-width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
}

.tab-content {
    display: none;
    padding: var(--spacing-xl);
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.tab-content h3 {
    font-family: var(--font-heading);
    margin-top: 0;
    color: var(--color-primary);
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    position: relative;
    padding-left: var(--spacing-md);
    line-height: 1.3;
}

.tab-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(3px, 0.5vw, 4px);
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
}

.tab-content p {
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 10px;
    font-size: clamp(1rem, 2vw, 1.05rem);
}

/* ========================================= */
/* 7. CARTES PAIEMENT - RESPONSIVE PARFAITE */
/* ========================================= */

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: clamp(12px, 3vw, 20px);
    margin-top: clamp(20px, 4vw, 30px);
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2vw, 12px);
    padding: clamp(22px, 4vw, 30px) clamp(16px, 3vw, 20px);
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--color-text);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 120px;
}

.payment-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(3px, 0.5vw, 4px);
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

@media (hover: hover) {
    .payment-method:hover::before {
        transform: scaleX(1);
    }
    
    .payment-method:hover {
        background: var(--color-card);
        border-color: var(--color-accent);
        transform: translateY(-5px);
        box-shadow: var(--shadow-md);
    }
    
    .payment-method:hover i {
        transform: scale(1.15);
        color: var(--color-accent-light);
    }
}

.payment-method i {
    font-size: clamp(28px, 5vw, 36px);
    color: var(--color-accent);
    transition: var(--transition);
}

.payment-method span {
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-weight: 700;
}

/* Breakpoints spécifiques grille paiement */
@media (max-width: 480px) {
    .payment-methods {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .payment-methods {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 901px) {
    .payment-methods {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================= */
/* 8. GRID LAYOUT - RESPONSIVE */
/* ========================================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(30px, 6vw, 60px);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

@media (min-width: 1025px) {
    .contact-grid {
        grid-template-columns: 1.4fr 0.6fr;
    }
}

/* ========================================= */
/* 9. FORMULAIRE - RESPONSIVE */
/* ========================================= */

.contact-form-container {
    background: var(--color-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: clamp(3px, 0.5vw, 4px);
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.contact-form-container h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.01em;
    position: relative;
    padding-left: var(--spacing-md);
    line-height: 1.2;
}

.contact-form-container h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: clamp(3px, 0.5vw, 4px);
    height: 100%;
    background: var(--color-accent);
    border-radius: 2px;
}

/* ========================================= */
/* 10. CHAMPS FORMULAIRE - RESPONSIVE */
/* ========================================= */

.main-form {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(15px, 3vw, 25px);
}

.form-group {
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 2 colonnes sur tablette et desktop */
@media (min-width: 768px) {
    .form-group:not(.full-width) {
        flex: 1 1 calc(50% - 12.5px);
    }
}

.form-group label {
    font-weight: 600;
    margin-bottom: clamp(8px, 1.5vw, 10px);
    color: var(--color-text);
    font-size: clamp(0.9rem, 1.8vw, 0.95rem);
    letter-spacing: 0.3px;
}

.main-form input,
.main-form select,
.main-form textarea {
    padding: clamp(12px, 2.5vw, 14px) clamp(16px, 3vw, 18px);
    background: var(--color-background);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: clamp(0.95rem, 2vw, 1rem);
    font-family: var(--font-body);
    width: 100%;
    transition: var(--transition);
    color: var(--color-text);
    outline: none;
}

.main-form input::placeholder,
.main-form textarea::placeholder {
    color: var(--color-text-light);
    opacity: 0.6;
}

.main-form input:focus,
.main-form select:focus,
.main-form textarea:focus {
    background: var(--color-card);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-focus);
    transform: translateY(-1px);
}

.main-form textarea {
    min-height: clamp(140px, 25vw, 160px);
    resize: vertical;
    line-height: 1.7;
}

.main-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C7A89' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right clamp(12px, 2vw, 15px) center;
    padding-right: clamp(35px, 6vw, 40px);
}

/* ========================================= */
/* 11. BOUTON SUBMIT - RESPONSIVE */
/* ========================================= */

.button.primary {
    width: 100%;
    padding: clamp(16px, 3vw, 18px) clamp(32px, 6vw, 40px);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: #222;
    text-shadow: 0 1px 2px rgba(255,255,255,0.15);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.05rem);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    margin-top: clamp(10px, 2vw, 15px);
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.15vw, 1px);
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .button.primary:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
        color: #fff;
    }
}

.button.primary:active {
    transform: translateY(-1px);
}

/* ========================================= */
/* 12. COLONNE INFORMATIONS - RESPONSIVE */
/* ========================================= */

.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 3vw, 25px);
}

.contact-info-container h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.info-block {
    background: var(--color-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.info-block::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: clamp(3px, 0.5vw, 4px);
    background: var(--color-accent);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

@media (hover: hover) {
    .info-block:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-accent);
    }
}

.info-block h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.3rem);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.info-block p {
    color: var(--color-text-light);
    line-height: 1.8;
    font-size: clamp(0.95rem, 2vw, 1rem);
    margin-bottom: 10px;
}

.info-block a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    word-break: break-word;
}

@media (hover: hover) {
    .info-block a:hover {
        color: var(--color-primary);
    }
    
    .info-block a:hover::after {
        width: 100%;
    }
}

.info-block a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.info-block p strong {
    color: var(--color-text);
    font-weight: 700;
}

/* Badge Premium */
.quick-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    color: white;
    padding: clamp(8px, 2vw, 10px) clamp(20px, 4vw, 25px);
    border-radius: var(--radius-full);
    font-size: clamp(0.8rem, 1.5vw, 0.85rem);
    font-weight: 700;
    margin-top: clamp(15px, 3vw, 20px);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: clamp(0.5px, 0.15vw, 1px);
    transition: var(--transition);
}

@media (hover: hover) {
    .quick-badge:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

/* ========================================= */
/* 13. BREAKPOINTS PRÉCIS */
/* ========================================= */

/* Très petits écrans (320-360px) */
@media (max-width: 360px) {
    .contact-section {
        padding: 70px 3% 40px;
    }
    
    .payment-method {
        min-height: 100px;
        padding: 20px 14px;
    }
}

/* Petits smartphones (361-480px) */
@media (min-width: 361px) and (max-width: 480px) {
    .contact-section {
        padding: 75px 4% 40px;
    }
}

/* Smartphones moyens (481-640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .contact-section {
        padding: 85px 4.5% 45px;
    }
}

/* Tablettes portrait (641-768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .contact-section {
        padding: 90px 5% 50px;
    }
}

/* Tablettes landscape (769-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .contact-section {
        padding: 100px 5% 60px;
    }
}

/* Desktop moyen (1025-1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .contact-section {
        padding: 110px 5% 70px;
    }
}

/* Large desktop (1281-1920px) */
@media (min-width: 1281px) and (max-width: 1920px) {
    .contact-section {
        padding: 120px 5% 80px;
    }
}

/* Ultra-wide screens (1920px+) */
@media (min-width: 1921px) {
    .contact-section {
        max-width: 1600px;
    }
}

/* ========================================= */
/* 14. ORIENTATION LANDSCAPE MOBILE */
/* ========================================= */

@media (max-height: 500px) and (orientation: landscape) {
    .contact-section {
        padding: 60px 5% 30px;
    }
    
    .contact-header {
        margin-bottom: 30px;
    }
    
    .contact-header h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .tabs-container {
        margin-bottom: 25px;
    }
    
    .tab-content {
        padding: var(--spacing-md);
    }
    
    .back-button-fixed {
        top: 10px;
        left: 10px;
    }
    
    .back-button-fixed .back-link {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

/* ========================================= */
/* 15. ANIMATIONS */
/* ========================================= */

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

.contact-section,
.contact-form-container,
.info-block {
    animation: fadeInUp 0.6s ease-out backwards;
}

.info-block:nth-child(1) { animation-delay: 0.1s; }
.info-block:nth-child(2) { animation-delay: 0.15s; }
.info-block:nth-child(3) { animation-delay: 0.2s; }
.info-block:nth-child(4) { animation-delay: 0.25s; }

/* ========================================= */
/* 16. ACCESSIBILITÉ */
/* ========================================= */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus Visible */
a:focus-visible,
button:focus-visible,
.button.primary:focus-visible,
.back-button-fixed .back-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.tab-button:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}

/* Sélection de texte */
::selection {
    background: var(--color-accent-light);
    color: white;
}

::-moz-selection {
    background: var(--color-accent-light);
    color: white;
}

/* ========================================= */
/* 17. SCROLLBAR RESPONSIVE */
/* ========================================= */

::-webkit-scrollbar {
    width: clamp(8px, 1.5vw, 10px);
    height: clamp(8px, 1.5vw, 10px);
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-background);
}

/* ========================================= */
/* 18. UTILITAIRES */
/* ========================================= */

.email-text {
    color: var(--color-primary);
    font-weight: bold;
    letter-spacing: 0.5px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.site-footer {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
}

/* ========================================= */
/* 19. SAFE AREAS POUR MOBILES MODERNES */
/* ========================================= */

@supports (padding: max(0px)) {
    .contact-section {
        padding-left: max(clamp(4%, 5vw, 5%), env(safe-area-inset-left));
        padding-right: max(clamp(4%, 5vw, 5%), env(safe-area-inset-right));
    }
    
    .back-button-fixed {
        left: max(clamp(15px, 3vw, 30px), env(safe-area-inset-left));
        top: max(clamp(15px, 3vw, 30px), env(safe-area-inset-top));
    }
}

/* ========================================= */
/* 20. PRINT STYLES */
/* ========================================= */

@media print {
    body::after,
    .back-button-fixed {
        display: none !important;
    }
    
    .contact-section {
        padding: 20px;
        max-width: 100%;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-form-container,
    .info-block,
    .tabs-container {
        box-shadow: none;
        border: 1px solid var(--color-border);
        page-break-inside: avoid;
    }
    
    .button.primary {
        display: none;
    }
    
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ========================================= */
/* 21. TOUCH OPTIMIZATION */
/* ========================================= */

@media (hover: none) and (pointer: coarse) {
    /* Désactiver transformations hover sur touch */
    .payment-method:hover,
    .info-block:hover,
    .button.primary:hover,
    .back-button-fixed .back-link:hover {
        transform: none;
    }
    
    /* Active states plus prononcés */
    .button.primary:active {
        transform: scale(0.98);
    }
    
    .back-button-fixed .back-link:active {
        transform: scale(0.95);
    }
    
    /* Zones tactiles minimales 44x44px */
    .button.primary,
    .back-button-fixed .back-link {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ========================================= */
/* 22. FALLBACKS NAVIGATEURS ANCIENS */
/* ========================================= */

/* Fallback pour navigateurs sans clamp() */
@supports not (width: clamp(1px, 2vw, 3px)) {
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 1rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 4rem;
        --radius-sm: 4px;
        --radius-md: 8px;
        --radius-lg: 12px;
    }
    
    .contact-header h1 {
        font-size: 2.5rem;
    }
    
    .contact-header p {
        font-size: 1.1rem;
    }
    
    .back-button-fixed .back-link {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .tab-button {
        font-size: 1rem;
        padding: 18px 22px;
    }
    
    .payment-method {
        padding: 25px 18px;
    }
    
    .contact-form-container h2 {
        font-size: 2rem;
    }
    
    .main-form input,
    .main-form select,
    .main-form textarea {
        font-size: 1rem;
        padding: 14px 18px;
    }
}

/* Fallback pour navigateurs sans CSS Grid */
@supports not (display: grid) {
    .contact-grid {
        display: block;
    }
    
    .contact-grid > * {
        margin-bottom: 40px;
    }
    
    .payment-methods {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .payment-method {
        flex: 1 1 calc(50% - 10px);
        min-width: 180px;
    }
}

/* ========================================= */
/* 23. RESPONSIVE IMAGES */
/* ========================================= */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================= */
/* 24. MICRO-INTERACTIONS RESPONSIVE */
/* ========================================= */

/* Taille des icônes responsive */
.payment-method i,
.tab-button i,
.info-block i {
    transition: var(--transition);
}

/* Animation subtile au scroll */
@media (min-width: 768px) {
    .info-block,
    .payment-method {
        will-change: transform;
    }
}

/* ========================================= */
/* 25. OPTIMISATIONS PERFORMANCE */
/* ========================================= */

/* GPU Acceleration pour animations fluides */
.payment-method,
.info-block,
.button.primary,
.back-button-fixed .back-link,
.contact-form-container,
.tabs-container {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ========================================= */
/* 26. HIGH DPI / RETINA SCREENS */
/* ========================================= */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body::after {
        /* Meilleure qualité sur écrans retina */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ========================================= */
/* 27. VERY SMALL SCREENS (< 320px) */
/* ========================================= */

@media (max-width: 319px) {
    .contact-section {
        padding: 60px 2% 35px;
    }
    
    .back-button-fixed .back-link {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
    }
    
    .contact-header h1 {
        font-size: 1.6rem;
    }
    
    .tab-button {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .payment-method {
        padding: 18px 12px;
        min-height: 90px;
    }
    
    .payment-method i {
        font-size: 24px;
    }
    
    .main-form input,
    .main-form select,
    .main-form textarea {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .button.primary {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/* ========================================= */
/* 28. TABLET LANDSCAPE SPECIFIC */
/* ========================================= */

@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .payment-methods {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================= */
/* 29. DESKTOP LARGE SCREENS */
/* ========================================= */

@media (min-width: 1600px) {
    .contact-section {
        padding: 130px 5% 90px;
    }
    
    .contact-header h1 {
        font-size: 4.5rem;
    }
    
    .contact-form-container,
    .info-block {
        padding: var(--spacing-xl) calc(var(--spacing-xl) * 1.2);
    }
}

/* ========================================= */
/* 30. ASPECT RATIO CONTAINERS */
/* ========================================= */

@supports (aspect-ratio: 1) {
    .payment-method {
        aspect-ratio: auto;
    }
}

/* ========================================= */
/* 31. PRÉFÉRENCES SYSTÈME */
/* ========================================= */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000000;
    }
    
    .main-form input,
    .main-form select,
    .main-form textarea {
        border-width: 3px;
    }
    
    .button.primary {
        border: 3px solid #000;
    }
}

/* Reduced Transparency */
@media (prefers-reduced-transparency: reduce) {
    .payment-method::before,
    body::after {
        opacity: 1;
    }
}

/* ========================================= */
/* 32. CONTAINER QUERIES (Future-proof) */
/* ========================================= */

@supports (container-type: inline-size) {
    .payment-methods {
        container-type: inline-size;
    }
    
    @container (min-width: 600px) {
        .payment-method {
            font-size: 1.1rem;
        }
    }
}

/* ========================================= */
/* 33. AJUSTEMENTS FINAUX RESPONSIVE */
/* ========================================= */

/* Éviter les débordements */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    position: relative;
}

/* Hauteur minimale pour très petits écrans */
.contact-section {
    min-height: calc(100vh - 60px);
}

/* Espacement entre sections responsive */
.contact-grid > * + * {
    margin-top: 0;
}

/* Largeur maximale des éléments de texte */
.tab-content p,
.info-block p {
    max-width: 65ch;
}

/* ========================================= */
/* 34. ÉTATS HOVER DESKTOP UNIQUEMENT */
/* ========================================= */

@media (hover: hover) and (pointer: fine) {
    /* Tous les hovers sont déjà définis avec @media (hover: hover) */
    
    /* Effet supplémentaire sur les liens */
    .info-block a {
        position: relative;
    }
    
    /* Smooth scroll sur desktop */
    html {
        scroll-behavior: smooth;
    }
}

/* ========================================= */
/* 35. RESPONSIVE TYPOGRAPHY SCALE */
/* ========================================= */

/* Échelle typographique fluide */
h1 { font-size: clamp(1.8rem, 5vw, 4rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 1.3rem); }
p { font-size: clamp(0.95rem, 2vw, 1.05rem); }
small { font-size: clamp(0.8rem, 1.5vw, 0.9rem); }

/* ========================================= */
/* 36. EDGE CASES */
/* ========================================= */

/* Très larges écrans (4K) */
@media (min-width: 2560px) {
    .contact-section {
        max-width: 1800px;
    }
    
    body {
        font-size: 18px;
    }
}

/* Très haute résolution verticale */
@media (min-height: 1200px) {
    .contact-section {
        padding-top: clamp(120px, 20vh, 180px);
        padding-bottom: clamp(80px, 15vh, 120px);
    }
}
/* =========================================
   FORMULAIRE — Labels et mentions
   ========================================= */
.required { color: #c0392b; margin-left: 2px; }
.optional { color: #6C7A89; font-size: 0.85rem; font-weight: 400; }
.form-mentions { font-size: 0.82rem; color: #6C7A89; margin-bottom: 1rem; }
/* ========================================= */
/* FIN DU CSS RESPONSIVE OPTIMISÉ */
/* Version: 2.0 - Light Mode Only */
/* Compatible: Tous navigateurs modernes */
/* Testé: Mobile (320px) à Desktop 4K (2560px+) */
/* ========================================= */
