*,
*::after,
*::before {
    box-sizing: border-box;
}

body {
    background-image: url('img/chrismas_background.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed; /* Bloque l'image pendant le défilement */
    margin: 0;
}

/* --- PAGE D ACCUEIL AVEC CADEAUX */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #9ac7db;
}

header>h1 {
    padding: 0 10px;
}

#intro {
    text-align: center;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: solid 1.5px silver;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.50);
}

/* Ajustement de l'image du cadeau */
.card img {
    width: 100%;
    max-width: 180px;
    height: 180px;
    object-fit: contain; 
    border-radius: 8px;
    margin: 15px 0;
}

.card h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.card .gift-title {
    font-weight: bold;
    color: #e74c3c; 
    font-size: 1.2rem;
}

.card .price {
    font-weight: 600;
    color: #27ae60;
    margin: 10px 0;
}

.card a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #9ac7db;
    color: black;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.card a:hover {
    background-color: #c6ced1;
}


.reservation-box {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    width: 100%;
    text-align: center;
}

.btn-reserver {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-reserver:hover {
    background-color: #219150;
}

.btn-annuler {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
}

.status {
    font-weight: bold;
    font-size: 0.9rem;
    margin: 5px 0;
}

.status.taken-by-me { color: #27ae60; }
.status.taken { color: #7f8c8d; }
.status.secret { color: #3498db; font-style: italic; }





.links {
    display:flex;
    justify-content:center;
    gap:15px;
    margin-bottom: 20px;
}

.links > a {
    font-weight: 500;
    color : black;
    text-decoration: none;
    font-size: 1rem;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border: solid 1px #2c3e50;
    padding: 10px 25px;
    border-radius: 10px;
    
}



/* --- PAGE DE CONNEXION --- */

.body-form {
    background-image: url('img/chrismas_background.webp');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed; /* Bloque l'image pendant le défilement */
    margin: 0;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    padding-top: 70px;
}

/* --- PAGE D AJOUTS --- */


.login-box, 
.box {
    background: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    margin: auto; /* Sécurité pour forcer le centrage */
    margin-top: 50px;
}

.login-box h1, 
.box h2 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #2d3436;
    font-size: 1.8rem;
    text-align: center;
}

/* ==========================================================================
   3. CHAMPS ET FORMULAIRES (Partagés)
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #636e72;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Tous les types de champs réagissent de la même façon */
.form-group input {
    width: 100%;
    padding: 11px;
    border: 1px solid #dfe6e9;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #0984e3;
    box-shadow: 0 0 5px rgba(9, 132, 227, 0.3);
}

/* ==========================================================================
   4. BOUTONS
   ========================================================================== */
/* Bouton bleu par défaut (Connexion) */
.btn-login, 
.btn-valider-form {
    width: 100%;
    padding: 12px;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-login {
    background-color: #0984e3;
}

.btn-login:hover {
    background-color: #006bbf;
}

/* Bouton vif/festif (Ajout de cadeau) */
.btn-valider-form {
    background-color: #ff7675;
}

.btn-valider-form:hover {
    background-color: #d63031;
    transform: translateY(-1px);
}

/* ==========================================================================
   5. MESSAGES ET LIENS
   ========================================================================== */
.error-msg, 
.alert {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.error-msg, 
.alert-error {
    background-color: #ffeaa7;
    color: #d63031;
    border: 1px solid #ff7675;
}

.alert-success {
    background-color: #55efc4;
    color: #00b894;
    border: 1px solid #00b894;
}

.retour {
    text-align: center;
    margin-top: 20px;
}

.retour a {
    color: #0984e3;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
}

.retour a:hover {
    text-decoration: underline;
}