/* style.css */

body.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f3f3 0%, #e6e9f0 100%);
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 20px;
}

.logo {
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-container {
    width: 100%;
    max-width: 700px;
    padding: 40px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #065f46, #0d9488);
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
    position: relative;
}

.field label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.field input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.field input:focus {
    outline: none;
    border-color: #065f46;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.1);
}

.field input:hover {
    border-color: #9ca3af;
}

button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #065f46, #0d9488);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(6, 95, 70, 0.2);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(6, 95, 70, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

.form-container a {
    color: #065f46;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.form-container a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #065f46;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.form-container a:hover::after {
    transform: scaleX(1);
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
}

/* Animation de chargement pour le bouton */
button[type="submit"]:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Style pour les messages d'erreur */
.field .error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Style pour les champs invalides */
.field input:invalid {
    border-color: #dc2626;
}

/*********************************************************************/

.alert.success {
    background-color: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.alert.danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}


/************************************/


.unsubscribe-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f2f2f2;
    padding: 20px;
}

.unsubscribe-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    min-width: 320px;
    max-width: 400px;
    text-align: center;
}

.unsubscribe-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #dc2626; /* rouge pour danger */
}

.unsubscribe-message {
    margin-bottom: 20px;
    color: #333;
}

.unsubscribe-buttons a {
    display: inline-block;
    margin: 10px 5px;
    padding: 10px 20px;
    background-color: #065f46;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.unsubscribe-buttons a.danger {
    background-color: #dc2626;
}

.unsubscribe-buttons a:hover {
    opacity: 0.9;
}


/********************************************************/

.admin-container {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
th {
    background-color: #065f46;
    color: white;
}
.button-submit {
    width: auto;
    padding: 10px 20px;
    background-color: #dc2626;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}
.button-submit:hover {
    background-color: #a31b1b;
}
#run_newsletter_send-result {
    margin-top: 10px;
    color: green;
    text-align: center;
}


/**************************************/


.btn-delete {
    background-color: #dc2626;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}
.btn-delete:hover {
    background-color: #a31b1b;
}


/*************** newsletter history **************************/

body.body-bg {
  background-color: #f3f4f6;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  margin: 0;
  padding: 30px;
  color: #1f2937;
}

/* CONTENEUR */
.admin-container {
  max-width: 1000px;
  margin: auto;
  background: #ffffff;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

/* TITRE */
.section-title {
  font-size: 28px;
  text-align: center;
  color: #166534;
  font-weight: 800;
  margin-bottom: 30px;
}

/* BOUTON ENVOI NEWSLETTER */
.button-submit {
  background-color: #166534;
  color: white;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 22px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.3);
}

.button-submit:hover {
  background-color: #14532d;
}

/* TABLEAU DES ABONNÉS */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
}

.table-head {
  background-color: #e5e7eb;
  color: #111827;
  font-weight: 700;
}

.styled-th,
.styled-td {
  padding: 14px 18px;
  text-align: left;
}

.styled-tr:nth-child(odd) {
  background-color: #f9fafb;
}

.styled-tr:hover {
  background-color: #ecfdf5;
  transition: background-color 0.2s ease;
}

/* LIEN SUPPRIMER */
.btn-delete {
  background-color: #f87171;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s ease-in-out;
}

.btn-delete:hover {
  background-color: #dc2626;
}

/* MESSAGE DE RÉSULTAT */
#run_newsletter_send-result {
  margin-top: 15px;
  font-weight: bold;
  color: #166534;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .admin-container {
    padding: 20px;
  }

  .button-submit {
    width: 100%;
  }

  .styled-th,
  .styled-td {
    padding: 10px 14px;
    font-size: 14px;
  }
}



  /**************/

  .body-bg{
    margin: 0;
    display: flex;
    justify-content: center;
    margin-top: 60px;
  }
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f3f3f3 0%, #e6e9f0 100%);
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(6,95,70,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(6,95,70,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(6,95,70,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(6,95,70,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(6,95,70,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.login-page h2 {
    text-align: center;
    color: #065f46;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(6, 95, 70, 0.1);
}

.login-page h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #065f46, #0d9488);
    border-radius: 2px;
}

.login-page form {
    width: 100%;
    max-width: 450px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

.login-page form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #065f46, #0d9488);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-page .field {
    margin-bottom: 25px;
    position: relative;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.login-page .field:nth-child(1) { animation-delay: 0.1s; }
.login-page .field:nth-child(2) { animation-delay: 0.2s; }
.login-page .field:nth-child(3) { animation-delay: 0.3s; }

.login-page .field label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.login-page .field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #374151;
}

.login-page .field input:focus {
    outline: none;
    border-color: #065f46;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.1);
    transform: translateY(-2px);
}

.login-page .field input:hover {
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.login-page .field input::placeholder {
    color: #9ca3af;
}

.login-page .field:nth-child(3) {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    margin-top: 10px;
}

.login-page .field:nth-child(3) label {
    color: #374151;
    font-weight: 700;
    margin-bottom: 12px;
}

.login-page .field:nth-child(3) input {
    background: white;
    border: 2px solid #e5e7eb;
}

.login-page .field:nth-child(3) input:focus {
    border-color: #065f46;
    box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.1);
}

.login-page button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, #065f46, #0d9488);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(6, 95, 70, 0.2);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.6s ease-out 0.4s both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-page button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-page button[type="submit"]:hover::before {
    left: 100%;
}

.login-page button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(6, 95, 70, 0.3);
}

.login-page button[type="submit"]:active {
    transform: translateY(0);
}

.login-page button[type="submit"]:focus {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(6, 95, 70, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(6, 95, 70, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(6, 95, 70, 0);
    }
}


@media (max-width: 768px) {
    .login-page {
        padding: 15px;
    }
    
    .login-page h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .login-page form {
        padding: 30px 25px;
        margin: 0 10px;
    }
    
    .login-page .field input {
        padding: 12px 16px;
    }
    
    .login-page button[type="submit"] {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .login-page h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    
    .login-page form {
        padding: 25px 20px;
    }
    
    .login-page .field {
        margin-bottom: 20px;
    }
}


.login-page .field:focus-within {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

.login-page button[type="submit"]:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-page .field .error-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 5px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-page .field input:invalid {
    border-color: #dc2626;
    animation: shake 0.5s ease-in-out;
}

.login-page .field:hover label {
    color: #065f46;
}

.login-page .login-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.login-page .back-link {
    color: #065f46;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(6, 95, 70, 0.05);
    border: 1px solid rgba(6, 95, 70, 0.1);
}

.login-page .back-link:hover {
    background: rgba(6, 95, 70, 0.1);
    border-color: rgba(6, 95, 70, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(6, 95, 70, 0.15);
}

.login-page .back-link:active {
    transform: translateY(0);
}

.login-page .back-link::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #065f46;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.login-page .back-link:hover::before {
    transform: scaleX(1);
}
