/* RESET & VARIABLES */
:root {
    --primary: #2c3e50;    /* Gris foncé "Midnight" */
    --accent: #3498db;     /* Bleu électrique */
    --highlight: #e67e22;  /* Orange pop */
    --bg: #ecf0f1;         /* Gris très clair */
    --card-bg: #ffffff;
    --text: #34495e;
    --radius: 12px;        /* Arrondis plus légers, moins "bébé" */
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg);
    /* Motif géométrique subtil pour faire "jeune" sans faire "enfant" */
    background-image: radial-gradient(#bdc3c7 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* TYPOGRAPHY */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; /* Très gras pour un effet poster */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: -1px;
}

h1 {
    font-size: 2.5rem;
    color: white;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

/* HEADER STYLE "STREETWEAR" */
.main-header {
    background-color: var(--primary);
    padding: 30px 20px;
    text-align: center;
    border-bottom: 6px solid var(--accent);
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    color: #bdc3c7;
    font-size: 1rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* LAYOUT & MARGINS FIX */
.main-wrapper {
    width: 90%;            /* Laisse 5% de marge de chaque côté */
    max-width: 1100px;     /* Ne devient pas trop large sur grand écran */
    margin: 0 auto;        /* Centre le tout */
    padding-bottom: 50px;
}

/* INTRO TEXT BLOCK */
.text-center.text {
    background: white;
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    border-left: 5px solid var(--accent);
}

/* REGLES - STYLE "INFO BOX" */
.regles {
    background: white;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 30px;
    margin: 0 auto 50px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1); /* Ombre "dure" style BD */
}

.regles strong {
    font-family: 'Montserrat', sans-serif;
    color: var(--highlight);
    font-size: 1.2rem;
    display: block;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.regles ul {
    padding-left: 20px;
}

.regles li {
    margin-bottom: 12px;
    list-style-type: none;
    position: relative;
    padding-left: 25px;
}

.regles li::before {
    content: '\f00c'; /* Check mark FontAwesome */
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900;
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 0;
}

/* GRID SYSTEM POUR LES CADEAUX */
.liste-cadeaux {
    background: transparent;
}

.liste-ul-cadeaux {
    display: grid;
    /* Responsive grid : s'adapte auto à la largeur */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.liste-ul-cadeaux > hr {
    display: none; /* Cache les séparateurs obsolètes */
}

/* CARD DESIGN - STYLE "PRODUIT TECH" */
.uncadeau {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e1e1e1;
    height: 100%; /* Uniformise la hauteur */
}

.uncadeau:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: var(--accent);
}

.container {
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image Zone */
.imgdivcadeau {
    width: 100%;
    height: 220px;
    padding: 20px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}

.imgcadeau {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

/* Description Zone */
.descriptioncadeau {
    padding: 25px;
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: white;
    text-align: center;
}

.titrecadeau {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
    min-height: 3em; /* Pour aligner les titres */
    display: flex;
    align-items: center;
    justify-content: center;
}

.descriptiondescription {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 20px;
    flex-grow: 1;
}

.descriptionlien a {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

/* BOUTONS MODERNES */
.on-y-va, .btn {
    display: inline-block;
    background: var(--accent);
    color: white !important;
    padding: 12px 20px;
    border-radius: 6px; /* Boutons plus carrés */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: auto; /* Pousse le bouton en bas */
    transition: background 0.2s, transform 0.2s;
    border: none;
    width: 100%;
    cursor: pointer;
}

.on-y-va:hover, .btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.deja-offert {
    color: #27ae60;
    background: #eafaf1;
    padding: 10px;
    border-radius: 6px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    border: 1px solid #27ae60;
    margin-top: auto;
}

/* FORMULAIRES (Participer.php) */
.form-participation, .message-de-fin, .et-maintenant, .et-maintenant-par {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 650px;
    margin: 20px auto;
    color: var(--text);
    border-top: 5px solid var(--highlight);
}

.form-participation h2 {
    text-align: center;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 20px;
    background: #f9f9f9;
    transition: border-color 0.3s;
    font-family: 'Open Sans', sans-serif;
}

.form-control:focus {
    border-color: var(--accent);
    background: white;
    outline: none;
}

/* RAPPEL CADEAU (Page Participer) */
.rappel-cadeau .uncadeau {
    flex-direction: row;
    max-width: 800px;
    margin: 0 auto 40px;
    min-height: 200px;
}

.rappel-cadeau .imgdivcadeau {
    width: 35%;
    height: auto;
    border-right: 1px solid #f0f0f0;
    border-bottom: none;
}

.rappel-cadeau .descriptioncadeau {
    width: 65%;
    text-align: left;
    padding: 30px;
}

.rappel-cadeau .titrecadeau {
    justify-content: flex-start;
    min-height: auto;
    font-size: 1.5rem;
}

.retour {
    text-align: center;
    margin: 30px 0;
}

.retour a {
    color: var(--text);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

.retour a::before {
    content: '\f060'; /* Arrow left */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.retour a:hover {
    color: var(--accent);
}


.on-y-va:active, .btn:active {
    transform: translateY(2px) scale(0.98); /* Le bouton s'enfonce et rétrécit légèrement */
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.2); /* Ombre intérieure */
}
/* Focus visible pour l'accessibilité (navigation clavier) */
.on-y-va:focus, .btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* MOBILE OPTIMIZATIONS */
@media screen and (max-width: 768px) {
    h1 { 
        font-size: 1.8rem; 
    }
    
    .main-wrapper {
        width: 95%; /* Marge un peu plus fine sur mobile pour gagner de la place */
        padding: 10px;
    }

    .header-content {
        padding: 0 10px;
    }
    
    /* Sur mobile, on remet le rappel cadeau en vertical */
    .rappel-cadeau .uncadeau {
        flex-direction: column;
    }
    
    .rappel-cadeau .imgdivcadeau, 
    .rappel-cadeau .descriptioncadeau {
        width: 100%;
        border-right: none;
    }
    
    .rappel-cadeau .imgdivcadeau {
        border-bottom: 1px solid #f0f0f0;
        height: 200px;
    }
}