/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    background: #f7f7fa;
    color: #222;
    min-height: 100vh;
    line-height: 1.6;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(120deg, #fff 60%, #ffeaea 100%);
    color: #b71c1c;
    padding: 2rem 2rem 1.5rem 2rem;
    text-align: center;
    box-shadow: 0 2px 16px #e5393522;
    margin-bottom: 2rem;
}

header .logo {
    margin-bottom: 0.5rem;
}

header .logo img {
    max-height: 100px;
    width: auto;
    height: auto;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

header p {
    font-size: 1rem;
    margin-bottom: 0;
    color: #333;
}

/* Main content */
main {
    padding: 1rem 0 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Titres et liens */
h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 700;
    color: #e53935;
    letter-spacing: 1px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #e53935;
}

a {
    color: #e53935;
    transition: color 0.2s;
}

a:hover {
    text-decoration: underline;
    color: #b71c1c;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

/* Cartes */
.cards {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.card {
    background: #fff;
    padding: 0 0 2rem 0;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px #e5393522, 0 1.5px 8px #0001;
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 270px;
    max-width: 350px;
    flex: 1 1 270px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 16px 48px #e5393555, 0 2px 12px #0002;
}

.card div {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: #e53935;
}

/* Formulaires */
.booking-form {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px #e5393522, 0 1.5px 8px #0001;
    margin-bottom: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.booking-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px #e5393555, 0 2px 12px #0002;
}

.booking-form h2 {
    color: #e53935;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid #e53935;
    padding-bottom: 0.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 400px;
    padding: 1em;
    border: 1.5px solid #e5393533;
    border-radius: 10px;
    background: #f7f7fa;
    color: #222;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px #e5393522;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 4px 16px #e5393533;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.8em 2em;
    border: none;
    border-radius: 32px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(90deg, #e53935 60%, #ff1744 100%);
    color: white;
    box-shadow: 0 4px 16px #e5393533;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #ff1744 0%, #e53935 100%);
    box-shadow: 0 8px 32px #e5393555;
    transform: translateY(-2px) scale(1.04);
}

.cta {
    background: linear-gradient(90deg, #e53935 60%, #ff1744 100%);
    color: #fff;
    padding: 0.8em 2em;
    border-radius: 32px;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s, color 0.2s;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 16px #e5393533;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    letter-spacing: 1px;
    display: inline-block;
}

.cta:hover {
    background: linear-gradient(90deg, #ff1744 0%, #e53935 100%);
    box-shadow: 0 8px 32px #e5393555;
    transform: translateY(-2px) scale(1.04);
}

/* Alertes */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Services */
.services-info {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px #e5393522, 0 1.5px 8px #0001;
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.services-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px #e5393555, 0 2px 12px #0002;
}

.services-info h3 {
    color: #e53935;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    justify-items: center;
}

.service-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px #e5393522, 0 1.5px 8px #0001;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    border-left: 4px solid #e53935;
    width: 100%;
    max-width: 350px;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 16px 48px #e5393555, 0 2px 12px #0002;
}

.service-card h4 {
    color: #e53935;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.service-card p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.duration {
    background: linear-gradient(90deg, #e53935 60%, #ff1744 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px #e5393522;
}

/* Footer */
footer {
    background: #fff;
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: 1.1rem;
    color: #b71c1c;
    border-top: 1px solid #e5393533;
}

footer a {
    color: #e53935;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    text-decoration: underline;
    color: #b71c1c;
}

/* Administration */
.admin-header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 300;
}

.admin-header nav {
    display: flex;
    gap: 1rem;
}

.admin-header nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.admin-header nav a:hover,
.admin-header nav a.active {
    background-color: #667eea;
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.admin-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.add-creneau,
.recent-rdv {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.add-creneau h2,
.recent-rdv h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* Rendez-vous */
.rdv-list {
    max-height: 400px;
    overflow-y: auto;
}

.rdv-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.rdv-item:hover {
    background-color: #f8f9fa;
}

.rdv-info {
    flex: 1;
}

.rdv-info strong {
    display: block;
    color: #333;
    margin-bottom: 0.25rem;
}

.rdv-info .service {
    color: #667eea;
    font-size: 0.9rem;
    margin-right: 1rem;
}

.rdv-info .date {
    color: #666;
    font-size: 0.9rem;
}

.rdv-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-en_attente {
    background-color: #fff3cd;
    color: #856404;
}

.status-confirme {
    background-color: #d4edda;
    color: #155724;
}

.status-annule {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive */
@media (max-width: 1100px) {
    .services-grid {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-sections {
        grid-template-columns: 1fr;
    }
    
    .admin-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-header nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .services-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    header {
        padding: 1.5rem 1rem 1rem 1rem;
        margin-bottom: 1rem;
    }
    
    header .logo img {
        max-height: 80px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .booking-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .services-info {
        padding: 1.5rem;
        margin: 1rem;
    }
}

@media (max-width: 500px) {
    body {
        font-size: 0.98rem;
        padding: 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    header p {
        font-size: 1.05rem;
    }
    
    .booking-form,
    .services-info {
        padding: 1rem;
    }
    
    .service-card {
        min-width: 180px;
        max-width: 98vw;
        padding: 0 0 1rem 0;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.7em;
    }
    
    footer {
        font-size: 0.98rem;
        padding: 1.2rem 0;
    }
    
    .rdv-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
