/* ==========================================================================
   1. Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
}

/* ==========================================================================
   2. Layout Components - Tilt Logo Effect (CORRIGÉ)
   ========================================================================== */
.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.logo-container {
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.tilt-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    width: 200px;
    height: 200px;
    position: relative;
}

.tilt-area {
    position: relative;
    z-index: 2;
}

.logo-tilt-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    z-index: 1;
    text-decoration: none;
}

.logo-tilt {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.2s ease-out;
    transform-style: preserve-3d;
    pointer-events: none;
}

/* EFFET TILT CORRIGÉ - Sélecteurs directs */
.tilt-area:nth-child(1):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(1):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(10deg) rotateY(-10deg); }
.tilt-area:nth-child(2):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(2):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(10deg) rotateY(-5deg); }
.tilt-area:nth-child(3):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(3):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(10deg) rotateY(0deg); }
.tilt-area:nth-child(4):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(4):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(10deg) rotateY(5deg); }
.tilt-area:nth-child(5):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(5):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(10deg) rotateY(10deg); }
.tilt-area:nth-child(6):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(6):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(5deg) rotateY(-10deg); }
.tilt-area:nth-child(7):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(7):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(5deg) rotateY(-5deg); }
.tilt-area:nth-child(8):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(8):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(5deg) rotateY(0deg); }
.tilt-area:nth-child(9):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(9):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(5deg) rotateY(5deg); }
.tilt-area:nth-child(10):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(10):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(5deg) rotateY(10deg); }
.tilt-area:nth-child(11):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(11):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(0deg) rotateY(-10deg); }
.tilt-area:nth-child(12):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(12):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(0deg) rotateY(-5deg); }
.tilt-area:nth-child(13):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(13):hover ~ .logo-tilt { transform: perspective(1000px) scale(1.05); }
.tilt-area:nth-child(14):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(14):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(0deg) rotateY(5deg); }
.tilt-area:nth-child(15):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(15):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(0deg) rotateY(10deg); }
.tilt-area:nth-child(16):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(16):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-5deg) rotateY(-10deg); }
.tilt-area:nth-child(17):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(17):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-5deg) rotateY(-5deg); }
.tilt-area:nth-child(18):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(18):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-5deg) rotateY(0deg); }
.tilt-area:nth-child(19):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(19):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-5deg) rotateY(5deg); }
.tilt-area:nth-child(20):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(20):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-5deg) rotateY(10deg); }
.tilt-area:nth-child(21):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(21):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-10deg) rotateY(-10deg); }
.tilt-area:nth-child(22):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(22):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-10deg) rotateY(-5deg); }
.tilt-area:nth-child(23):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(23):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-10deg) rotateY(0deg); }
.tilt-area:nth-child(24):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(24):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-10deg) rotateY(5deg); }
.tilt-area:nth-child(25):hover ~ .logo-tilt-link ~ .logo-tilt,
.tilt-area:nth-child(25):hover ~ .logo-tilt { transform: perspective(1000px) rotateX(-10deg) rotateY(10deg); }


.btn-connexion {
    background-color: #ce000c;
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 6px rgba(206, 0, 12, 0.3);
}

.btn-connexion:hover {
    background-color: #a50009;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(206, 0, 12, 0.4);
}

.footer {
    display: flex;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #ddd;
}

.footer a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ce000c;
}

/* ==========================================================================
   3. Modal Styles
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 40px;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 40px;
    color: #ce000c;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    padding: 0;
}

.close-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5px;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    background-color: #ce000c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(206, 0, 12, 0.3);
}

.close-btn:hover svg {
    transform: rotate(90deg);
}

.modal-inner {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

h1 {
    color: #ce000c;
    margin-bottom: 30px;
    font-size: 32px;
}

h2 {
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 22px;
}

h3 {
    color: #555;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 18px;
}

p,
li {
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 16px;
}

ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   4. Mentions Légales - Structure professionnelle
   ========================================================================== */
.legal-date {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
    font-style: italic;
}

.legal-section {
    margin-bottom: 40px;
}

.contact-card,
.hosting-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #ce000c;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.hosting-card h3 {
    color: #ce000c;
    margin-bottom: 15px;
    font-size: 18px;
}

.rgpd-section {
    background: #fff8f8;
    border: 1px solid #ffe6e6;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}

.rgpd-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.rgpd-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ce000c;
}

.rgpd-details h3 {
    color: #ce000c;
    margin: 25px 0 15px 0;
}

.no-cookies {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #28a745;
    margin-top: 20px;
}

/* ==========================================================================
   5. Form Styles
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #ce000c;
}

select {
    cursor: pointer;
    background-color: white;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    background-color: #ce000c;
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    width: 100%;
}

.btn-submit.visible {
    display: inline-block;
}

.btn-submit:hover {
    background-color: #a50009;
}

.success-message {
    display: none;
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #c3e6cb;
}

.error-message {
    color: #ce000c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.honeypot {
    display: none !important;
    visibility: hidden;
}

/* ==========================================================================
   6. Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .footer {
        padding: 15px 20px;
        font-size: 12px;
    }

    .modal-content {
        padding: 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .close-btn svg {
        width: 22px;
        height: 22px;
    }

    h1 {
        font-size: 24px;
    }

    .rgpd-grid {
        grid-template-columns: 1fr;
    }

    .modal-inner {
        padding-top: 80px;
    }
}
s