/**
 * Style pour Esprit Créatif
 * Couleurs de la marque: #f2ecd4 (beige clair) et #181714 (noir)
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --color-primary: #181714;
    --color-secondary: #f2ecd4;
    --color-accent: #d4a574;
    --color-success: #4caf50;
    --color-error: #f44336;
    --color-warning: #ff9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #181714 0%, #2c2420 50%, #181714 100%);
    background-attachment: fixed;
    color: var(--color-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Effet de particules en arrière-plan */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(242, 236, 212, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(212, 165, 116, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(242, 236, 212, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px 50px;
    background: transparent;
    position: relative;
    animation: fadeInDown 1s ease-out;
}

.logo {
    max-width: 350px;
    height: auto;
    margin: 0 auto 30px;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    animation: floatAnimation 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-family: 'Playfair Display', serif;
    color: var(--color-secondary);
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 4px 20px rgba(242, 236, 212, 0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header p {
    color: var(--color-secondary);
    font-size: 1.05em;
    margin-bottom: 12px;
    line-height: 1.7;
    font-weight: 300;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.5s both;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.header p strong {
    font-weight: 600;
    color: var(--color-accent);
    text-shadow: 0 2px 10px rgba(212, 165, 116, 0.4);
}

.header p:last-child {
    font-style: italic;
    font-size: 1.1em;
    margin-top: 20px;
    color: var(--color-accent);
    animation: fadeInUp 1s ease-out 0.7s both;
}

/* Formulaire */
.form-container {
    background: linear-gradient(145deg, rgba(242, 236, 212, 0.98), rgba(242, 236, 212, 1));
    padding: 35px 40px;
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(212, 165, 116, 0.2);
    margin: 30px auto;
    max-width: 900px;
    position: relative;
    animation: slideInUp 1s ease-out 0.9s both;
    backdrop-filter: blur(10px);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-accent), var(--color-primary), var(--color-accent));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-container:hover::before {
    opacity: 0.15;
}

.form-title {
    font-family: 'Playfair Display', serif;
    color: var(--color-primary);
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }
.form-group:nth-child(6) { animation-delay: 0.35s; }
.form-group:nth-child(7) { animation-delay: 0.4s; }

.form-group label {
    display: block;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9em;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--color-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid rgba(24, 23, 20, 0.2);
    border-radius: 8px;
    font-size: 0.95em;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.1),
                0 5px 20px rgba(212, 165, 116, 0.2);
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 90px;
    resize: vertical;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2c2420 100%);
    color: var(--color-secondary);
    width: 100%;
    box-shadow: 0 10px 25px rgba(24, 23, 20, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(24, 23, 20, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(24, 23, 20, 0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    margin-top: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp svg {
    transition: transform 0.3s ease;
}

.btn-whatsapp:hover svg {
    transform: rotate(15deg) scale(1.1);
}

/* Messages */
.message {
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    animation: slideInDown 0.5s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.success {
    background-color: var(--color-success);
    color: white;
    border-left-color: #2e7d32;
}

.message.error {
    background-color: var(--color-error);
    color: white;
    border-left-color: #c62828;
}

.message.warning {
    background-color: var(--color-warning);
    color: white;
    border-left-color: #ef6c00;
}

/* Back Office */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background-color: var(--color-secondary);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
}

.admin-header {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.admin-nav h2 {
    color: var(--color-primary);
}

.admin-content {
    background-color: var(--color-secondary);
    min-height: calc(100vh - 80px);
    padding: 30px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 1em;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card .stat-number {
    font-size: 2.5em;
    font-weight: 700;
}

/* Table */
.table-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px 15px;
    color: var(--color-primary);
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f5f5f5;
}

.btn-logout {
    background-color: var(--color-error);
    color: white;
    padding: 10px 20px;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-secondary);
    background: transparent;
    position: relative;
    z-index: 1;
    font-family: 'Montserrat', sans-serif;
}

footer p {
    opacity: 0.8;
    font-size: 0.95em;
}

footer a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.7;
}

footer a:hover {
    opacity: 1;
    text-shadow: 0 0 10px rgba(212, 165, 116, 0.5);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #181714 0%, #2c2420 50%, #181714 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loader-logo {
    max-width: 300px;
    height: auto;
    animation: pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(242, 236, 212, 0.3));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(242, 236, 212, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 20px 40px;
    }

    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .form-container {
        padding: 25px 20px;
    }

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

    .form-row .form-group {
        margin-bottom: 20px;
    }

    .logo {
        max-width: 280px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.9em;
    }

    table th,
    table td {
        padding: 10px;
    }

    .form-title {
        font-size: 1.8em;
    }

    .loader-logo {
        max-width: 250px;
    }

    .loader-spinner {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 15px 30px;
    }

    .header h1 {
        font-size: 1.6em;
        margin-bottom: 15px;
    }

    .header p {
        font-size: 0.95em;
    }

    .logo {
        max-width: 240px;
        margin-bottom: 20px;
    }

    .form-container {
        padding: 20px 15px;
        border-radius: 15px;
    }

    .form-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .form-group label {
        font-size: 0.85em;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9em;
        padding: 9px 12px;
    }

    .loader-logo {
        max-width: 200px;
    }

    .loader-spinner {
        width: 45px;
        height: 45px;
    }
}
