/* ============================================
   SOMMAIRE - PAGE D'ACCUEIL IDET
   Tout contenu dans max-width 1200px
   ============================================ */

/* Variables globales */
:root {
    --primary-blue: #000091;
    --accent-blue: #0063cb;
    --dark-blue: #000074;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --surface: #f9fafb;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* ============================================
   WRAPPER PRINCIPAL - CONTENU CENTRAL
   Hero et Footer restent en pleine largeur
   ============================================ */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
}

/* Container pour le contenu interne */
.container {
    padding: 0 32px;
}

/* ============================================
   SECTIONS COMMUNES
   ============================================ */
.section {
    padding: 80px 32px;
}

.section-header {
    margin-bottom: 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ============================================
   HERO SECTION - PLEINE LARGEUR
   ============================================ */
.hero {
    width: 100%;
    padding: 80px 32px;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    /* Image de fond à ajouter :
       background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('...');
       background-size: cover;
       background-position: center;
    */
    min-height: 350px;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero h1 {
    font-size: 2.5rem;
    color: white;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 480px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero .btn {
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    color: white;
    text-decoration: none;
}

.hero .btn:hover {
    background: white;
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero .btn-filled {
    background: white;
    color: var(--primary-blue);
    border-color: white;
}

.hero .btn-filled:hover {
    background: var(--surface);
    border-color: var(--surface);
}

/* ============================================
   NOS FORMATIONS
   ============================================ */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.formation-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px 24px;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.formation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.formation-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.formation-card:hover::before {
    transform: scaleX(1);
}

.formation-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.5;
}

/* ============================================
   LA RECHERCHE & LA SUPERVISION
   ============================================ */
.two-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.block-card {
    border-radius: var(--radius-md);
    padding: 48px 32px;
    min-height: 160px;
    position: relative;
    overflow: hidden;
    background: rgba(50, 60, 70, 0.85);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    /* Pour images de fond :
       background: linear-gradient(rgba(50, 60, 70, 0.7), rgba(50, 60, 70, 0.7)), url('...');
       background-size: cover;
       background-position: center;
    */
}

.block-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.block-card h3 {
    font-size: 1.25rem;
    color: white;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ============================================
   POURQUOI CHOISIR L'IDET - PLEINE LARGEUR
   ============================================ */
.why-section {
    width: 100%;
    background-color: #e8eef5;
    padding: 80px 32px;
}

.why-container {
    max-width: 1200px;
    margin: 0 auto;
}

.why-section .section-label {
    color: var(--primary-blue);
}

.why-section .section-title {
    color: var(--primary-blue);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.why-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 32px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.why-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    border-radius: var(--radius-sm);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.why-card:hover .why-icon {
    transform: scale(1.1);
}

.why-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.why-card p {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 500;
}

/* ============================================
   ÉVÉNEMENTS & ACTUALITÉ
   ============================================ */
.events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.event-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    min-height: 180px;
    transition: all 0.3s ease;
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.event-card h3 {
    font-size: 0.875rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   NEWSLETTER - PLEINE LARGEUR
   ============================================ */
.newsletter-section {
    width: 100%;
    padding: 60px 32px;
    background: var(--surface);
}

.newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.newsletter-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-card h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.newsletter-card > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.newsletter-input {
    flex: 1;
    max-width: 280px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.btn-submit {
    padding: 12px 24px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-submit:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 145, 0.3);
}

/* ============================================
   CONTACT - PLEINE LARGEUR
   ============================================ */
.contact-section {
    width: 100%;
    padding: 80px 32px;
    background: var(--surface);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-wrapper h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.contact-wrapper > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 32px;
}

.contact-form-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-align: left;
}

/* Style pour le formulaire SPIP */
.contact-form-box .formulaire_spip {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form-box label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
    font-size: 0.875rem;
}

.contact-form-box input[type="text"],
.contact-form-box input[type="email"],
.contact-form-box textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: white;
}

.contact-form-box input:focus,
.contact-form-box textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.contact-form-box textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form-box button[type="submit"],
.contact-form-box input[type="submit"] {
    padding: 14px 28px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.contact-form-box button[type="submit"]:hover,
.contact-form-box input[type="submit"]:hover {
    background: var(--dark-blue);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .formations-grid {
        grid-template-columns: 1fr 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 24px;
        min-height: 300px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section {
        padding: 60px 24px;
    }

    .formations-grid,
    .two-blocks,
    .events-grid {
        grid-template-columns: 1fr;
    }

    .why-section {
        padding: 60px 24px;
    }

    .why-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .newsletter-section {
        padding: 48px 24px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-input {
        max-width: none;
    }

    .contact-section {
        padding: 60px 24px;
    }

    .contact-form-box {
        padding: 28px 20px;
    }
}