/* Prof Chez Vous - Thème vert */
:root {
  --primary: #15803d;
  --primary-hover: #166534;
  --primary-light: #22c55e;
  --primary-bg: #dcfce7;
  --secondary: #0d9488;
  --secondary-hover: #0f766e;
  --secondary-light: #2dd4bf;
  --success: #16a34a;
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #fafafa;
  --white: #ffffff;
  --border: #e5e7eb;
  --error: #dc2626;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --font-sans: 'Raleway', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Stabilisation du Viewport */
html, body {
    width: 100%;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-text-size-adjust: 100%; /* Empêche l'ajustement auto du texte sur iOS */
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 1.5rem;
  }
}


.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 600; /* Plus marqué pour le premium */
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.btn:hover {
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn:active {
    transform: translateY(0);
    filter: brightness(0.9);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-hover);
  filter: brightness(1.05); /* Effet de lumière subtil */
}
.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
}
.btn-secondary:hover {
  background: var(--secondary-hover);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary-bg);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}

.form-group .errorlist {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: var(--error);
}

.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.alert-error {
  background: #fef2f2;
  color: var(--error);
  border: 1px solid #fecaca;
}

.header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--primary);
}

.footer-links {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.footer-links a {
  margin: 0 0.5rem;
}

/* Grille standard pour les cartes professeurs */
.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem 0;
    justify-content: center; /* Centre les colonnes dans la grille */
}

@media (max-width: 480px) {
    .teachers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }
}

/* Stabilisation du Viewport globale */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Empêche le zoom auto sur iOS Safari */
@media screen and (max-width: 768px) {
    input, select, textarea, .ts-control input {
        font-size: 16px !important;
    }
}
